Method and apparatus of subsample interpolation filtering

ABSTRACT

Intra- or inter-prediction can be used for video encoding and decoding. For that purpose, an apparatus and methods obtain a filter (a set of coefficients) from a set of filters based on the subsample position (p) defined for the set of positions of predicted samples, where the set of filters is obtained by combining at least two pre-defined input filter sets.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/RU2021/050116, filed on Apr. 29, 2021, which claims the priority toU.S. provisional Application No. 63/017,642, filed on Apr. 29, 2020. Thedisclosures of the aforementioned applications are hereby incorporatedby reference in their entireties.

FIELD

Embodiments of the present application (disclosure) generally relate tothe field of picture processing and more particularly to image and/orvideo encoding and decoding, and in particular to method and apparatusof subsample interpolation filtering for intra and/or inter prediction.

BACKGROUND

Video coding (video encoding and decoding) is used in a wide range ofdigital video applications, for example broadcast digital television(TV), video transmission over internet and mobile networks, real-timeconversational applications such as video chat, video conferencing,digital video disc or digital versatile disc (DVD) and Blu-ray discs,video content acquisition and editing systems, and camcorders ofsecurity applications.

The amount of video data needed to depict even a relatively short videocan be substantial, which may result in difficulties when the data is tobe streamed or otherwise communicated across a communications networkwith limited bandwidth capacity. Thus, video data is generallycompressed before being communicated across modern daytelecommunications networks. The size of a video could also be an issuewhen the video is stored on a storage device because memory resourcesmay be limited. Video compression devices often use software and/orhardware at the source to code the video data prior to transmission orstorage, thereby decreasing the quantity of data needed to representdigital video images. The compressed data is then received at thedestination by a video decompression device that decodes the video data.With limited network resources and ever increasing demands of highervideo quality, improved compression and decompression techniques thatimprove compression ratio with little to no sacrifice in picture qualityare desirable.

SUMMARY

Embodiments of the present application provide apparatuses and methodsfor encoding and decoding according to the independent claims anddependent claims.

A first aspect of the disclosure relates to a method of intra or interprediction of a block. The method is performed by a decoding or anencoding apparatus. The method includes:

-   -   determining the set of reference samples;    -   obtaining predicted samples by performing the following steps        for each set of positions of predicted samples:        -   obtaining a filter (a set of coefficients) from a set of            filters based on the subpixel position (p) defined for the            set of positions of predicted samples;        -   determining a subset of reference samples for the set of            positions of predicted samples; and        -   obtaining predicted samples at positions of the set of            positions of predicted samples by convolving the subset of            reference samples with the obtained filter, where the set of            filters is obtained by combining at least two input filter            sets, and wherein the input filter sets are pre-defined.

The set of positions of predicted samples may be a row of predictedblock, and/or a column of predicted block.

As an example, the set of filters is obtained by combining at least twopre-defined filter sets using an estimation method, and wherein theestimation method uses a reference signal s(x) and an aggregatefunction, wherein the reference signal s(x) is pre-defined. Theestimation method may include the following steps:

-   -   Initializing an output filter set by one of the input filter        sets;    -   obtaining a set of filtered signals s_(F)(p,x) for a set of        subpixel position (p) by convolving the reference signal s(x)        with a filter (A1) of the output filter set that corresponds to        the subpixel position (p) value;    -   replacing the filter (A1) of the output filter set corresponding        to the subpixel position (p) with an input filter (A2) when the        value of an aggregate function for the input filter (A2) is        smaller than the value of an aggregate function for the filter        (A1) of the output filter set, wherein the value of an aggregate        function for the filter (A1) of the output filter set is        obtained based on values of s_(F)(p,x) for the given value of x.

A second aspect of the disclosure relates to an intra/inter processingmodule, which comprises an obtaining unit, a determining unit, and apredicting unit. The obtaining unit configured to obtain a filter (a setof coefficients) from a set of filters based on the subsample position(p) defined for the set of positions of predicted samples, where the setof filters is obtained by combining at least two input filter sets, andwhere the input filter sets are pre-defined. The determining unitconfigured to determine a subset of reference samples for the set ofpositions of predicted samples. The predicting unit configured to obtainpredicted samples at positions of the set of positions of predictedsamples by convolving the subset of reference samples with the obtainedfilter.

The method according to the first aspect of the disclosure can beperformed by the apparatus according to the third aspect of thedisclosure. Further features and implementation forms of the apparatusaccording to the third aspect of the disclosure correspond to thefeatures and implementation forms of the method according to the firstaspect of the disclosure.

According to a fourth aspect the disclosure relates to an apparatus fordecoding or encoding a video stream includes a processor and a memory.The memory is storing instructions that cause the processor to performthe method according to the first aspect or any possible embodiment ofthe first aspect.

According to a fifth aspect, a computer-readable storage medium havingstored thereon instructions that when executed cause one or moreprocessors configured to code video data is proposed. The instructionscause the one or more processors to perform a method according to thefirst aspect or any possible embodiment of the first aspect.

According to a sixth aspect, the disclosure relates to a computerprogram comprising program code for performing the method according tothe first aspect or any possible embodiment of the first aspect whenexecuted on a computer.

The present disclosure according to any of the previous embodiments mayprovide an advantage of performing the intra/inter-prediction of a videoframe in fast manner. This is because the filter coefficients of theinterpolation filter are obtained by combining at least two input filtersets. This avoids artefacts in the response in particular at highfrequencies. The linearity of the filter coefficients may provide anadvantage of reusing hardware.

Details of one or more embodiments are set forth in the accompanyingdrawings and the description below. Other features and advantages willbe introduced based on the description, drawings, and claims.

For the purpose of clarity, any one of the foregoing embodiments may becombined with any one or more of the other foregoing embodiments tocreate a new embodiment within the scope of the present disclosure.

These and other features will be more clearly understood from thefollowing detailed description taken in conjunction with theaccompanying drawings and claims.

BRIEF DESCRIPTION OF THE DRAWINGS

In the following, embodiments of the disclosure are described in moredetail with reference to the attached figures and drawings, in which:

FIG. 1A is a block diagram showing an example of a video coding systemconfigured to implement embodiments of the disclosure;

FIG. 1B is a block diagram showing another example of a video codingsystem configured to implement embodiments of the disclosure;

FIG. 2 is a block diagram showing an example of a video encoderconfigured to implement embodiments of the disclosure;

FIG. 3 is a block diagram showing an example structure of a videodecoder configured to implement embodiments of the disclosure;

FIG. 4 is a block diagram illustrating an example of an encodingapparatus or a decoding apparatus;

FIG. 5 is a block diagram illustrating another example of an encodingapparatus or a decoding apparatus;

FIG. 6 is a drawing showing angular intra prediction directions and theassociated intra-prediction modes in High-Efficiency Video Coding(HEVC);

FIG. 7A is a drawing showing angular intra prediction directions and theassociated intra-prediction modes in Joint Exploration Model (JEM);

FIG. 7B is a drawing showing angular intra prediction directions and theassociated intra-prediction modes in Versatile Video coding (VVC);

FIG. 7C is a drawing showing angular intra prediction directions and theassociated intra-prediction modes in VVC Test Model 3 (VTM-3.0) and VVCspecification draft v.3;

FIG. 8A is a drawing showing the processes of intra prediction byreference samples filtering or by interpolation process;

FIG. 8B is a drawing showing 1/4 subsample positions for interinterpolation filtering;

FIG. 8C is a drawing showing an example of intra- and inter-predictionprocesses of a codec that have the same interpolation filter for lumaintra prediction and chroma motion compensation of inter prediction;

FIG. 9 is a drawing showing an example of a filter combination forsmoothing, where a set of reference samples are inputted to theinterpolation filter;

FIG. 10 is a drawing showing an exemplary combination of filters forsharpening interpolation filtering, including clipping operation;

FIG. 11 is a drawing showing an exemplary combination of filters forsharpening interpolation filtering, with an alternative position of theclipping operation;

FIG. 12A) is a drawing showing an exemplary combination of filters forsharpening interpolation filtering, using filter of adjustable strength;

FIG. 12B) is a drawing showing another exemplary combination of filtersfor sharpening interpolation filtering, using filter of adjustablestrength;

FIGS. 13-21 are drawings showing different combinations of Look-Up Table(LUT)-based and analytic representations of interpolation filtercoefficients;

FIG. 22 is a drawing showing an exemplary implementation of thecoefficients calculation method;

FIG. 23 is an exemplary block diagram of combining the set of finiteimpulse response (FIR) coefficients;

FIG. 24 is an exemplary block diagram of obtaining a set of filteredsignals s_(F)(p,x);

FIG. 25A is a block diagram showing the exemplary reference signal s(x);

FIG. 25B is an exemplary block diagram showing the filtered signals_(F)(p,x) when p is set to 1;

FIG. 25C is an exemplary block diagram of the set of filtered signals;

FIG. 26 is an exemplary block diagram of the estimation method based onevaluation of magnitude;

FIG. 27 is an exemplary flowchart of the intra/inter-predictionprocessing;

FIG. 28 is an exemplary block diagram of the intra/inter-predictionprocessing module.

In the following identical reference signs refer to identical or atleast functionally equivalent features if not explicitly specifiedotherwise.

DETAILED DESCRIPTION List of Reference Signs

FIG. 1A

-   10 video coding system-   12 source device-   13 communication channel-   14 destination device-   16 picture source-   17 picture data-   18 pre-processor-   19 pre-processed picture data-   20 video encoder-   21 encoded picture data-   22 communication interface-   28 communication interface-   30 video decoder-   31 decoded picture data-   32 post processor-   33 post-processed picture data-   34 display device

FIG. 1B

-   40 video coding system-   41 imaging device(s)-   42 antenna-   43 processor(s)-   44 memory store(s)-   45 display device-   46 processing circuitry-   20 video encoder-   30 video decoder

FIG. 2

-   17 picture (data)-   19 pre-processed picture (data)-   20 encoder-   21 encoded picture data-   201 input (interface)-   204 residual calculation [unit or step]-   206 transform processing unit-   208 quantization unit-   210 inverse quantization unit-   212 inverse transform processing unit-   214 reconstruction unit-   220 loop filter unit-   230 decoded picture buffer (DPB)-   260 mode selection unit-   270 entropy encoding unit-   272 output (interface)-   244 inter prediction unit-   254 intra prediction unit-   262 partitioning unit-   203 picture block-   205 residual block-   213 reconstructed residual block-   215 reconstructed block-   221 filtered block-   231 decoded picture-   265 prediction block-   266 syntax elements-   207 transform coefficients-   209 quantized coefficients-   211 dequantized coefficients

FIG. 3

-   21 encoded picture data-   30 video decoder-   304 entropy decoding unit-   309 quantized coefficients-   310 inverse quantization unit-   311 dequantized coefficients-   312 inverse transform processing unit-   313 reconstructed residual block-   314 reconstruction unit-   315 reconstructed block-   320 loop filter-   321 filtered block-   330 decoded picture buffer DPB-   331 decoded picture-   360 mode application unit-   365 prediction block-   366 syntax elements-   344 inter prediction unit-   354 intra prediction unit

FIG. 4

-   400 video coding device-   410 ingress ports/input ports-   420 receiver units Rx-   430 processor-   440 transmitter units Tx-   450 egress ports/output ports-   460 memory-   470 coding module

FIG. 5

-   500 source device or destination device-   502 processor-   504 memory-   506 code and data-   508 operating system-   510 application programs-   512 bus-   518 display

FIG. 27

-   2700 flowchart of intra/inter-prediction processing method

FIG. 28

-   2800 flowchart of video coding method

FIG. 29

-   2900 intra/inter-processing module-   2910 reference sample obtaining unit-   2920 subpixel offset value obtaining unit-   2930 subpixel interpolation filter

FIG. 30

-   3000 video coding module-   3010 intra-prediction processing unit-   3020 subpixel interpolation filter

In the following description, reference is made to the accompanyingfigures, which form part of the disclosure, and which show, by way ofillustration, exemplary aspects of embodiments of the disclosure orexemplary aspects in which embodiments of the present disclosure may beused. It is understood that embodiments of the disclosure may be used inother aspects and comprise structural or logical changes not depicted inthe figures. The following detailed description, therefore, is not to betaken in a limiting sense, and the scope of the present disclosure isdefined by the appended claims.

For instance, it is understood that a disclosure in connection with adescribed method may also hold true for a corresponding device or systemconfigured to perform the method and vice versa. For example, if one ora plurality of exemplary method steps are described, a correspondingdevice may include one or a plurality of units, e.g., functional units,to perform the described one or plurality of method steps (e.g., oneunit performing the one or plurality of steps, or a plurality of unitseach performing one or more of the plurality of steps), even if such oneor more units are not explicitly described or illustrated in thefigures. On the other hand, for example, if an exemplary apparatus isdescribed based on one or a plurality of units, e.g., functional units,a corresponding method may include one step to perform the functionalityof the one or plurality of units (e.g., one step performing thefunctionality of the one or plurality of units, or a plurality of stepseach performing the functionality of one or more of the plurality ofunits), even if such one or plurality of steps are not explicitlydescribed or illustrated in the figures. Further, it is understood thatthe features of the various exemplary embodiments and/or aspectsdescribed herein may be combined with each other, unless specificallynoted otherwise.

Video coding typically refers to the processing of a sequence ofpictures, which form the video or video sequence. Instead of the term“picture” the term “frame” or “image” may be used as synonyms in thefield of video coding. Video coding (or coding in general) comprises twoparts video encoding and video decoding. Video encoding is performed atthe source side, typically comprising processing (e.g., by compression)the original video pictures to reduce the amount of data required forrepresenting the video pictures (for more efficient storage and/ortransmission). Video decoding is performed at the destination side andtypically comprises the inverse processing compared to the encoder toreconstruct the video pictures. Embodiments referring to “coding” ofvideo pictures (or pictures in general) shall be understood to relate to“encoding” or “decoding” of video pictures or respective videosequences. The combination of the encoding part and the decoding part isalso referred to as CODEC (Coding and Decoding).

In case of lossless video coding, the original video pictures can bereconstructed, i.e., the reconstructed video pictures have the samequality as the original video pictures (assuming no transmission loss orother data loss during storage or transmission). In case of lossy videocoding, further compression, e.g., by quantization, is performed, toreduce the amount of data representing the video pictures, which cannotbe completely reconstructed at the decoder, i.e., the quality of thereconstructed video pictures is lower or worse compared to the qualityof the original video pictures.

Several video coding standards belong to the group of “lossy hybridvideo codecs” (i.e., combine spatial and temporal prediction in thesample domain and 2D transform coding for applying quantization in thetransform domain). Each picture of a video sequence is typicallypartitioned into a set of non-overlapping blocks and the coding istypically performed on a block level. In other words, at the encoder thevideo is typically processed, i.e., encoded, on a block (video block)level, e.g., by using spatial (intra picture) prediction and/or temporal(inter picture) prediction to generate a prediction block, subtractingthe prediction block from the current block (block currentlyprocessed/to be processed) to obtain a residual block, transforming theresidual block and quantizing the residual block in the transform domainto reduce the amount of data to be transmitted (compression), whereas atthe decoder the inverse processing compared to the encoder is applied tothe encoded or compressed block to reconstruct the current block forrepresentation. Furthermore, the encoder duplicates the decoderprocessing loop such that both will generate identical predictions(e.g., intra- and inter predictions) and/or re-constructions forprocessing, i.e., coding, the subsequent blocks.

In the following embodiments of a video coding system 10, a videoencoder 20 and a video decoder 30 are described based on FIGS. 1 to 3 .

FIG. 1A is a schematic block diagram illustrating an example codingsystem 10, e.g., a video coding system 10 (coding system 10) that mayutilize techniques of this present application. Video encoder 20(encoder 20) and video decoder 30 (decoder 30) of video coding system 10represent examples of devices that may be configured to performtechniques in accordance with various examples described in the presentapplication.

As shown in FIG. 1A, the coding system 10 comprises a source device 12configured to provide encoded picture data 21 e.g., to a destinationdevice 14 for decoding the encoded picture data 13.

The source device 12 comprises an encoder 20, and may additionally,i.e., optionally, comprise a picture source 16, a pre-processor (orpre-processing unit) 18, e.g., a picture pre-processor 18, and acommunication interface or communication unit 22.

The picture source 16 may comprise or be any kind of picture capturingdevice, for example a camera for capturing a real-world picture, and/orany kind of a picture generating device, for example a computer-graphicsprocessor for generating a computer animated picture, or any kind ofother device for obtaining and/or providing a real-world picture, acomputer generated picture (e.g., a screen content, a virtual reality(VR) picture) and/or any combination thereof (e.g., an augmented reality(AR) picture). The picture source may be any kind of memory or storagestoring any of the aforementioned pictures.

In distinction to the pre-processor 18 and the processing performed bythe pre-processing unit 18, the picture or picture data 17 may also bereferred to as raw picture or raw picture data 17.

Pre-processor 18 is configured to receive the (raw) picture data 17 andto perform pre-processing on the picture data 17 to obtain apre-processed picture 19 or pre-processed picture data 19.Pre-processing performed by the pre-processor 18 may, e.g., comprisetrimming, color format conversion (e.g., from red, green, and blue (RGB)to YCbCr), color correction, or de-noising. It can be understood thatthe pre-processing unit 18 may be optional component.

The video encoder 20 is configured to receive the pre-processed picturedata 19 and provide encoded picture data 21 (further details will bedescribed below, e.g., based on FIG. 2 ).

Communication interface 22 of the source device 12 may be configured toreceive the encoded picture data 21 and to transmit the encoded picturedata 21 (or any further processed version thereof) over communicationchannel 13 to another device, e.g., the destination device 14 or anyother device, for storage or direct reconstruction.

The destination device 14 comprises a decoder 30 (e.g., a video decoder30), and may additionally, i.e., optionally, comprise a communicationinterface or communication unit 28, a post-processor 32 (orpost-processing unit 32) and a display device 34.

The communication interface 28 of the destination device 14 isconfigured receive the encoded picture data 21 (or any further processedversion thereof), e.g., directly from the source device 12 or from anyother source, e.g., a storage device, e.g., an encoded picture datastorage device, and provide the encoded picture data 21 to the decoder30.

The communication interface 22 and the communication interface 28 may beconfigured to transmit or receive the encoded picture data 21 or encodeddata 13 via a direct communication link between the source device 12 andthe destination device 14, e.g., a direct wired or wireless connection,or via any kind of network, e.g., a wired or wireless network or anycombination thereof, or any kind of private and public network, or anykind of combination thereof.

The communication interface 22 may be, e.g., configured to package theencoded picture data 21 into an appropriate format, e.g., packets,and/or process the encoded picture data using any kind of transmissionencoding or processing for transmission over a communication link orcommunication network.

The communication interface 28, forming the counterpart of thecommunication interface 22, may be, e.g., configured to receive thetransmitted data and process the transmission data using any kind ofcorresponding transmission decoding or processing and/or de-packaging toobtain the encoded picture data 21.

Both, communication interface 22 and communication interface 28 may beconfigured as unidirectional communication interfaces as indicated bythe arrow for the communication channel 13 in FIG. 1A pointing from thesource device 12 to the destination device 14, or bi-directionalcommunication interfaces, and may be configured, e.g., to send andreceive messages, e.g., to set up a connection, to acknowledge andexchange any other information related to the communication link and/ordata transmission, e.g., encoded picture data transmission.

The decoder 30 is configured to receive the encoded picture data 21 andprovide decoded picture data 31 or a decoded picture 31 (further detailswill be described below, e.g., based on FIG. 3 or FIG. 5 ).

The post-processor 32 of destination device 14 is configured topost-process the decoded picture data 31 (also called reconstructedpicture data), e.g., the decoded picture 31, to obtain post-processedpicture data 33, e.g., a post-processed picture 33. The post-processingperformed by the post-processing unit 32 may comprise, e.g., colorformat conversion (e.g., from YCbCr to RGB), color correction, trimming,or re-sampling, or any other processing, e.g., for preparing the decodedpicture data 31 for display, e.g., by display device 34.

The display device 34 of the destination device 14 is configured toreceive the post-processed picture data 33 for displaying the picture,e.g., to a user or viewer. The display device 34 may be or comprise anykind of display for representing the reconstructed picture, e.g., anintegrated or external display or monitor. The displays may, e.g.,comprise liquid crystal displays (LCD), organic light emitting diodes(OLED) displays, plasma displays, projectors, micro LED displays, liquidcrystal on silicon (LCoS), digital light processor (DLP) or any kind ofother display.

Although FIG. 1A depicts the source device 12 and the destination device14 as separate devices, embodiments of devices may also comprise both orboth functionalities, the source device 12 or correspondingfunctionality and the destination device 14 or correspondingfunctionality. In such embodiments the source device 12 or correspondingfunctionality and the destination device 14 or correspondingfunctionality may be implemented using the same hardware and/or softwareor by separate hardware and/or software or any combination thereof.

As will be understood by a skilled person based on the description, theexistence and (exact) split of functionalities of the different units orfunctionalities within the source device 12 and/or destination device 14as shown in FIG. 1A may vary depending on the actual device andapplication.

The encoder 20 (e.g., a video encoder 20) or the decoder 30 (e.g., avideo decoder 30) or both encoder 20 and decoder 30 may be implementedvia processing circuitry as shown in FIG. 1B, such as one or moremicroprocessors, digital signal processors (DSPs), application-specificintegrated circuits (ASICs), field-programmable gate arrays (FPGAs),discrete logic, hardware, video coding dedicated or any combinationsthereof. The encoder 20 may be implemented via processing circuitry 46to embody the various modules as discussed with respect to encoder 20 ofFIG. 2 and/or any other encoder system or subsystem described herein.The decoder 30 may be implemented via processing circuitry 46 to embodythe various modules as discussed with respect to decoder 30 of FIG. 3and/or any other decoder system or subsystem described herein. Theprocessing circuitry may be configured to perform the various operationsas discussed later. As shown in FIG. 5 , if the techniques areimplemented partially in software, a device may store instructions forthe software in a suitable, non-transitory computer-readable storagemedium and may execute the instructions in hardware using one or moreprocessors to perform the techniques of this disclosure. Either of videoencoder 20 and video decoder 30 may be integrated as part of a combinedencoder/decoder (CODEC) in a single device, for example, as shown inFIG. 1B.

Source device 12 and destination device 14 may comprise any of a widerange of devices, including any kind of handheld or stationary devices,e.g., notebook or laptop computers, mobile phones, smart phones, tabletsor tablet computers, cameras, desktop computers, set-top boxes,televisions, display devices, digital media players, video gamingconsoles, video streaming devices (such as content services servers orcontent delivery servers), broadcast receiver device, broadcasttransmitter device, or the like and may use no or any kind of operatingsystem. In some cases, the source device 12 and the destination device14 may be equipped for wireless communication. Thus, the source device12 and the destination device 14 may be wireless communication devices.

In some cases, video coding system 10 illustrated in FIG. 1A is merelyan example and the techniques of the present application may apply tovideo coding settings (e.g., video encoding or video decoding) that donot necessarily include any data communication between the encoding anddecoding devices. In other examples, data is retrieved from a localmemory, streamed over a network, or the like. A video encoding devicemay encode and store data to memory, and/or a video decoding device mayretrieve and decode data from memory. In some examples, the encoding anddecoding is performed by devices that do not communicate with oneanother, but simply encode data to memory and/or retrieve and decodedata from memory.

For convenience of description, embodiments of the disclosure aredescribed herein, for example, by reference to High-Efficiency VideoCoding (HEVC) or to the reference software of Versatile Video coding(VVC), the next generation video coding standard developed by the JointCollaboration Team on Video Coding (JCT-VC) of ITU-T Video CodingExperts Group (VCEG) and ISO/IEC Motion Picture Experts Group (MPEG).One of ordinary skill in the art will understand that embodiments of thedisclosure are not limited to HEVC or VVC.

Encoder and Encoding Method

FIG. 2 shows a schematic block diagram of an example video encoder 20that is configured to implement the techniques of the presentapplication. In the example of FIG. 2 , the video encoder 20 comprisesan input 201 (or input interface 201), a residual calculation unit 204,a transform processing unit 206, a quantization unit 208, an inversequantization unit 210, and inverse transform processing unit 212, areconstruction unit 214, a loop filter unit 220, a decoded picturebuffer (DPB) 230, a mode selection unit 260, an entropy encoding unit270 and an output 272 (or output interface 272). The mode selection unit260 may include an inter prediction unit 244, an intra prediction unit254 and a partitioning unit 262. Inter prediction unit 244 may include amotion estimation unit and a motion compensation unit (not shown). Avideo encoder 20 as shown in FIG. 2 may also be referred to as hybridvideo encoder or a video encoder according to a hybrid video codec.

The residual calculation unit 204, the transform processing unit 206,the quantization unit 208, the mode selection unit 260 may be referredto as forming a forward signal path of the encoder 20, whereas theinverse quantization unit 210, the inverse transform processing unit212, the reconstruction unit 214, the buffer 216, the loop filter 220,the decoded picture buffer (DPB) 230, the inter prediction unit 244 andthe intra-prediction unit 254 may be referred to as forming a backwardsignal path of the video encoder 20, wherein the backward signal path ofthe video encoder 20 corresponds to the signal path of the decoder (seevideo decoder 30 in FIG. 3 ). The inverse quantization unit 210, theinverse transform processing unit 212, the reconstruction unit 214, theloop filter 220, the decoded picture buffer (DPB) 230, the interprediction unit 244 and the intra-prediction unit 254 are also referredto forming the “built-in decoder” of video encoder 20.

Pictures & Picture Partitioning (Pictures & Bocks)

The encoder 20 may be configured to receive, e.g., via input 201, apicture 17 (or picture data 17), e.g., picture of a sequence of picturesforming a video or video sequence. The received picture or picture datamay also be a pre-processed picture 19 (or pre-processed picture data19). For sake of simplicity the following description refers to thepicture 17. The picture 17 may also be referred to as current picture orpicture to be coded (in particular in video coding to distinguish thecurrent picture from other pictures, e.g., previously encoded and/ordecoded pictures of the same video sequence, i.e., the video sequencewhich also comprises the current picture).

A (digital) picture is or can be regarded as a two-dimensional array ormatrix of samples with intensity values. A sample in the array may alsobe referred to as pixel (short form of picture element) or a pel. Thenumber of samples in horizontal and vertical direction (or axis) of thearray or picture define the size and/or resolution of the picture. Forrepresentation of color, typically three color components are employed,i.e., the picture may be represented or include three sample arrays. InRBG format or color space a picture comprises a corresponding red, greenand blue sample array. However, in video coding each pixel is typicallyrepresented in a luminance and chrominance format or color space, e.g.,YCbCr, which comprises a luminance component indicated by Y (sometimesalso L is used instead) and two chrominance components indicated by Cband Cr. The luminance (luma) component Y represents the brightness orgrey level intensity (e.g., like in a grey-scale picture), while the twochrominance (chroma) components Cb and Cr represent the chromaticity orcolor information components. Accordingly, a picture in YCbCr formatcomprises a luminance sample array of luminance sample values (Y), andtwo chrominance sample arrays of chrominance values (Cb and Cr).Pictures in RGB format may be converted or transformed into YCbCr formatand vice versa, the process is also known as color transformation orconversion. If a picture is monochrome, the picture may comprise only aluminance sample array. Accordingly, a picture may be, for example, anarray of luma samples in monochrome format or an array of luma samplesand two corresponding arrays of chroma samples in 4:2:0, 4:2:2, and4:4:4 color format.

Embodiments of the video encoder 20 may comprise a picture partitioningunit (not depicted in FIG. 2 ) configured to partition the picture 17into a plurality of (typically non-overlapping) picture blocks 203.These blocks may also be referred to as root blocks, macro blocks(H.264/AVC) or coding tree blocks (CTB) or coding tree units (CTU)(H.265/HEVC and VVC). The picture partitioning unit may be configured touse the same block size for all pictures of a video sequence and thecorresponding grid defining the block size, or to change the block sizebetween pictures or subsets or groups of pictures, and partition eachpicture into the corresponding blocks.

In further embodiments, the video encoder may be configured to receivedirectly a block 203 of the picture 17, e.g., one, several or all blocksforming the picture 17. The picture block 203 may also be referred to ascurrent picture block or picture block to be coded.

Like the picture 17, the picture block 203 again is or can be regardedas a two-dimensional array or matrix of samples with intensity values(sample values), although of smaller dimension than the picture 17. Inother words, the block 203 may comprise, e.g., one sample array (e.g., aluma array in case of a monochrome picture 17, or a luma or chroma arrayin case of a color picture) or three sample arrays (e.g., a luma and twochroma arrays in case of a color picture 17) or any other number and/orkind of arrays depending on the color format applied. The number ofsamples in horizontal and vertical direction (or axis) of the block 203define the size of block 203. Accordingly, a block may, for example, anM×N (M-column by N-row) array of samples, or an M×N array of transformcoefficients.

Embodiments of the video encoder 20 as shown in FIG. 2 may be configuredencode the picture 17 block by block, e.g., the encoding and predictionis performed per block 203.

Residual Calculation

The residual calculation unit 204 may be configured to calculate aresidual block 205 (also referred to as residual 205) based on thepicture block 203 and a prediction block 265 (further details about theprediction block 265 are provided later), e.g., by subtracting samplevalues of the prediction block 265 from sample values of the pictureblock 203, sample by sample (pixel by pixel) to obtain the residualblock 205 in the sample domain.

Transform

The transform processing unit 206 may be configured to apply atransform, e.g., a discrete cosine transform (DCT) or discrete sinetransform (DST), on the sample values of the residual block 205 toobtain transform coefficients 207 in a transform domain. The transformcoefficients 207 may also be referred to as transform residualcoefficients and represent the residual block 205 in the transformdomain.

The transform processing unit 206 may be configured to apply integerapproximations of DCT/DST, such as the transforms specified forH.265/HEVC. Compared to an orthogonal DCT transform, such integerapproximations are typically scaled by a certain factor. In order topreserve the norm of the residual block which is processed by forwardand inverse transforms, additional scaling factors are applied as partof the transform process. The scaling factors are typically chosen basedon certain constraints like scaling factors being a power of two forshift operations, bit depth of the transform coefficients, tradeoffbetween accuracy and implementation costs, etc. Specific scaling factorsare, for example, specified for the inverse transform, e.g., by inversetransform processing unit 212 (and the corresponding inverse transform,e.g., by inverse transform processing unit 312 at video decoder 30) andcorresponding scaling factors for the forward transform, e.g., bytransform processing unit 206, at an encoder 20 may be specifiedaccordingly.

Embodiments of the video encoder 20 (respectively transform processingunit 206) may be configured to output transform parameters, e.g., a typeof transform or transforms, e.g., directly or encoded or compressed viathe entropy encoding unit 270, so that, e.g., the video decoder 30 mayreceive and use the transform parameters for decoding.

Quantization

The quantization unit 208 may be configured to quantize the transformcoefficients 207 to obtain quantized coefficients 209, e.g., by applyingscalar quantization or vector quantization. The quantized coefficients209 may also be referred to as quantized transform coefficients 209 orquantized residual coefficients 209.

The quantization process may reduce the bit depth associated with someor all of the transform coefficients 207. For example, an n-bittransform coefficient may be rounded down to an m-bit Transformcoefficient during quantization, where n is greater than m. The degreeof quantization may be modified by adjusting a quantization parameter(QP). For example for scalar quantization, different scaling may beapplied to achieve finer or coarser quantization. Smaller quantizationstep sizes correspond to finer quantization, whereas larger quantizationstep sizes correspond to coarser quantization. The applicablequantization step size may be indicated by a quantization parameter(QP). The quantization parameter may for example be an index to apredefined set of applicable quantization step sizes. For example, smallquantization parameters may correspond to fine quantization (smallquantization step sizes) and large quantization parameters maycorrespond to coarse quantization (large quantization step sizes) orvice versa. The quantization may include division by a quantization stepsize and a corresponding and/or the inverse dequantization, e.g., byinverse quantization unit 210, may include multiplication by thequantization step size. Embodiments according to some standards, e.g.,HEVC, may be configured to use a quantization parameter to determine thequantization step size. Generally, the quantization step size may becalculated based on a quantization parameter using a fixed pointapproximation of an equation including division. Additional scalingfactors may be introduced for quantization and dequantization to restorethe norm of the residual block, which might get modified because of thescaling used in the fixed point approximation of the equation forquantization step size and quantization parameter. In one exampleimplementation, the scaling of the inverse transform and dequantizationmight be combined. Alternatively, customized quantization tables may beused and signaled from an encoder to a decoder, e.g., in a bitstream.The quantization is a lossy operation, wherein the loss increases withincreasing quantization step sizes.

Embodiments of the video encoder 20 (respectively quantization unit 208)may be configured to output quantization parameters (QP), e.g., directlyor encoded via the entropy encoding unit 270, so that, e.g., the videodecoder 30 may receive and apply the quantization parameters fordecoding.

Inverse Quantization

The inverse quantization unit 210 is configured to apply the inversequantization of the quantization unit 208 on the quantized coefficientsto obtain dequantized coefficients 211, e.g., by applying the inverse ofthe quantization scheme applied by the quantization unit 208 based on orusing the same quantization step size as the quantization unit 208. Thedequantized coefficients 211 may also be referred to as dequantizedresidual coefficients 211 and correspond—although typically notidentical to the transform coefficients due to the loss byquantization—to the transform coefficients 207.

Inverse Tranform

The inverse transform processing unit 212 is configured to apply theinverse transform of the transform applied by the transform processingunit 206, e.g., an inverse discrete cosine transform (DCT) or inversediscrete sine transform (DST) or other inverse transforms, to obtain areconstructed residual block 213 (or corresponding dequantizedcoefficients 213) in the sample domain. The reconstructed residual block213 may also be referred to as transform block 213.

Reconstruction

The reconstruction unit 214 (e.g., adder or summer 214) is configured toadd the transform block 213 (i.e., reconstructed residual block 213) tothe prediction block 265 to obtain a reconstructed block 215 in thesample domain, e.g., by adding—sample by sample—the sample values of thereconstructed residual block 213 and the sample values of the predictionblock 265.

Filtering

The loop filter unit 220 (“loop filter” 220), is configured to filterthe reconstructed block 215 to obtain a filtered block 221, or ingeneral, to filter reconstructed samples to obtain filtered samples. Theloop filter unit is, e.g., configured to smooth pixel transitions, orotherwise improve the video quality. The loop filter unit 220 maycomprise one or more loop filters such as a de-blocking filter, asample-adaptive offset (SAO) filter or one or more other filters, e.g.,a bilateral filter, an adaptive loop filter (ALF), a sharpening, asmoothing filters or a collaborative filters, or any combinationthereof. Although the loop filter unit 220 is shown in FIG. 2 as beingan in loop filter, in other configurations, the loop filter unit 220 maybe implemented as a post loop filter. The filtered block 221 may also bereferred to as filtered reconstructed block 221.

Embodiments of the video encoder 20 (respectively loop filter unit 220)may be configured to output loop filter parameters (such as sampleadaptive offset information), e.g., directly or encoded via the entropyencoding unit 270, so that, e.g., a decoder 30 may receive and apply thesame loop filter parameters or respective loop filters for decoding.

Decoded Picture Buffer

The decoded picture buffer (DPB) 230 may be a memory that storesreference pictures, or in general reference picture data, for encodingvideo data by video encoder 20. The DPB 230 may be formed by any of avariety of memory devices, such as dynamic random access memory (DRAM),including synchronous DRAM (SDRAM), magneto-resistive RAM (MRAM),resistive RAM (RRAM), or other types of memory devices. The decodedpicture buffer (DPB) 230 may be configured to store one or more filteredblocks 221. The decoded picture buffer 230 may be further configured tostore other previously filtered blocks, e.g., previously reconstructedand filtered blocks 221, of the same current picture or of differentpictures, e.g., previously reconstructed pictures, and may providecomplete previously reconstructed, i.e., decoded, pictures (andcorresponding reference blocks and samples) and/or a partiallyreconstructed current picture (and corresponding reference blocks andsamples), for example for inter prediction. The decoded picture buffer(DPB) 230 may be also configured to store one or more unfilteredreconstructed blocks 215, or in general unfiltered reconstructedsamples, e.g., if the reconstructed block 215 is not filtered by loopfilter unit 220, or any other further processed version of thereconstructed blocks or samples.

Mode Selection (Partitioning & Prediction)

The mode selection unit 260 comprises partitioning unit 262,inter-prediction unit 244 and intra-prediction unit 254, and isconfigured to receive or obtain original picture data, e.g., an originalblock 203 (current block 203 of the current picture 17), andreconstructed picture data, e.g., filtered and/or unfilteredreconstructed samples or blocks of the same (current) picture and/orfrom one or a plurality of previously decoded pictures, e.g., fromdecoded picture buffer 230 or other buffers (e.g., line buffer, notshown). The reconstructed picture data is used as reference picture datafor prediction, e.g., inter-prediction or intra-prediction, to obtain aprediction block 265 or predictor 265.

Mode selection unit 260 may be configured to determine or select apartitioning for a current block prediction mode (including nopartitioning) and a prediction mode (e.g., an intra or inter predictionmode) and generate a corresponding prediction block 265, which is usedfor the calculation of the residual block 205 and for the reconstructionof the reconstructed block 215.

Embodiments of the mode selection unit 260 may be configured to selectthe partitioning and the prediction mode (e.g., from those supported byor available for mode selection unit 260), which provide the best matchor in other words the minimum residual (minimum residual means bettercompression for transmission or storage), or a minimum signalingoverhead (minimum signaling overhead means better compression fortransmission or storage), or which considers or balances both. The modeselection unit 260 may be configured to determine the partitioning andprediction mode based on rate distortion optimization (RDO), i.e.,select the prediction mode which provides a minimum rate distortion.Terms like “best”, “minimum”, “optimum” etc. in this context do notnecessarily refer to an overall “best”, “minimum”, “optimum”, etc. butmay also refer to the fulfillment of a termination or selectioncriterion like a value exceeding or falling below a threshold or otherconstraints leading potentially to a “sub-optimum selection” butreducing complexity and processing time.

In other words, the partitioning unit 262 may be configured to partitionthe block 203 into smaller block partitions or sub-blocks (which formagain blocks), e.g., iteratively using quad-tree-partitioning (QT),binary partitioning (BT) or triple-tree-partitioning (TT) or anycombination thereof, and to perform, e.g., the prediction for each ofthe block partitions or sub-blocks, wherein the mode selection comprisesthe selection of the tree-structure of the partitioned block 203 and theprediction modes are applied to each of the block partitions orsub-blocks.

In the following the partitioning (e.g., by partitioning unit 260) andprediction processing (by inter-prediction unit 244 and intra-predictionunit 254) performed by an example video encoder 20 will be explained inmore detail.

Partitioning

The partitioning unit 262 may partition (or split) a current block 203into smaller partitions, e.g., smaller blocks of square or rectangularsize. These smaller blocks (which may also be referred to as sub-blocks)may be further partitioned into even smaller partitions. This is alsoreferred to tree-partitioning or hierarchical tree-partitioning, whereina root block, e.g., at root tree-level 0 (hierarchy-level 0, depth 0),may be recursively partitioned, e.g., partitioned into two or moreblocks of a next lower tree-level, e.g., nodes at tree-level 1(hierarchy-level 1, depth 1), wherein these blocks may be againpartitioned into two or more blocks of a next lower level, e.g.,tree-level 2 (hierarchy-level 2, depth 2), etc. until the partitioningis terminated, e.g., because a termination criterion is fulfilled, e.g.,a maximum tree depth or minimum block size is reached. Blocks which arenot further partitioned are also referred to as leaf-blocks or leafnodes of the tree. A tree using partitioning into two partitions isreferred to as binary-tree (BT), a tree using partitioning into threepartitions is referred to as ternary-tree (TT), and a tree usingpartitioning into four partitions is referred to as quad-tree (QT).

As mentioned before, the term “block” as used herein may be a portion,in particular a square or rectangular portion, of a picture. Withreference, for example, to HEVC and VVC, the block may be or correspondto a coding tree unit (CTU), a coding unit (CU), prediction unit (PU),and transform unit (TU) and/or to the corresponding blocks, e.g., acoding tree block (CTB), a coding block (CB), a transform block (TB) orprediction block (PB).

For example, a coding tree unit (CTU) may be or comprise a CTB of lumasamples, two corresponding CTBs of chroma samples of a picture that hasthree sample arrays, or a CTB of samples of a monochrome picture or apicture that is coded using three separate color planes and syntaxstructures used to code the samples. Correspondingly, a coding treeblock (CTB) may be an N×N block of samples for some value of N such thatthe division of a component into CTBs is a partitioning. A coding unit(CU) may be or comprise a coding block of luma samples, twocorresponding coding blocks of chroma samples of a picture that hasthree sample arrays, or a coding block of samples of a monochromepicture or a picture that is coded using three separate color planes andsyntax structures used to code the samples. Correspondingly a codingblock (CB) may be an M×N block of samples for some values of M and Nsuch that the division of a CTB into coding blocks is a partitioning.

In embodiments, e.g., according to HEVC, a coding tree unit (CTU) may besplit into CUs by using a quad-tree structure denoted as coding tree.The decision whether to code a picture area using inter-picture(temporal) or intra-picture (spatial) prediction is made at the CUlevel. Each CU can be further split into one, two or four PUs accordingto the PU splitting type. Inside one PU, the same prediction process isapplied and the relevant information is transmitted to the decoder on aPU basis. After obtaining the residual block by applying the predictionprocess based on the PU splitting type, a CU can be partitioned intotransform units (TUs) according to another quad-tree structure similarto the coding tree for the CU.

In embodiments, e.g., according to the latest video coding standardcurrently in development, which is referred to as Versatile Video Coding(VVC), Quad-tree and binary tree (QTBT) partitioning is used topartition a coding block. In the QTBT block structure, a CU can haveeither a square or rectangular shape. For example, a coding tree unit(CTU) is first partitioned by a quad-tree structure. The quad-tree leafnodes are further partitioned by a binary tree or ternary (or triple)tree structure. The partitioning tree leaf nodes are called coding units(CUs), and that segmentation is used for prediction and transformprocessing without any further partitioning. This means that the CU, PUand TU have the same block size in the QTBT coding block structure. Inparallel, multiple partition, for example, triple tree partition wasalso proposed to be used together with the QTBT block structure.

In one example, the mode selection unit 260 of video encoder 20 may beconfigured to perform any combination of the partitioning techniquesdescribed herein.

As described above, the video encoder 20 is configured to determine orselect the best or an optimum prediction mode from a set of(pre-determined) prediction modes. The set of prediction modes maycomprise, e.g., intra-prediction modes and/or inter-prediction modes.

Intra-Prediction

The set of intra-prediction modes may comprise 35 differentintra-prediction modes, e.g., non-directional modes like DC (or mean)mode and planar mode, or directional modes, e.g., as defined in HEVC, ormay comprise 67 different intra-prediction modes, e.g., non-directionalmodes like DC (or mean) mode and planar mode, or directional modes,e.g., as defined for VVC.

The intra-prediction unit 254 is configured to use reconstructed samplesof neighboring blocks of the same current picture to generate anintra-prediction block 265 according to an intra-prediction mode of theset of intra-prediction modes.

The intra prediction unit 254 (or in general the mode selection unit260) is further configured to output intra-prediction parameters (or ingeneral information indicative of the selected intra prediction mode forthe block) to the entropy encoding unit 270 in form of syntax elements266 for inclusion into the encoded picture data 21, so that, e.g., thevideo decoder 30 may receive and use the prediction parameters fordecoding.

Inter-Prediction

The set of (or possible) inter-prediction modes depends on the availablereference pictures (i.e., previous at least partially decoded pictures,e.g., stored in DPB 230) and other inter-prediction parameters, e.g.,whether the whole reference picture or only a part, e.g., a searchwindow area around the area of the current block, of the referencepicture is used for searching for a best matching reference block,and/or e.g., whether pixel interpolation is applied, e.g., half/semi-peland/or quarter-pel interpolation, or not.

Additional to the above prediction modes, skip mode and/or direct modemay be applied.

The inter prediction unit 244 may include a motion estimation (ME) unitand a motion compensation (MC) unit (both not shown in FIG. 2 ). Themotion estimation unit may be configured to receive or obtain thepicture block 203 (current picture block 203 of the current picture 17)and a decoded picture 231, or at least one or a plurality of previouslyreconstructed blocks, e.g., reconstructed blocks of one or a pluralityof other/different previously decoded pictures 231, for motionestimation. E.g., a video sequence may comprise the current picture andthe previously decoded pictures 231, or in other words, the currentpicture and the previously decoded pictures 231 may be part of or form asequence of pictures forming a video sequence.

The encoder 20 may, e.g., be configured to select a reference block froma plurality of reference blocks of the same or different pictures of theplurality of other pictures and provide a reference picture (orreference picture index) and/or an offset (spatial offset) between theposition (x, y coordinates) of the reference block and the position ofthe current block as inter prediction parameters to the motionestimation unit. This offset is also called motion vector (MV).

The motion compensation unit is configured to obtain, e.g., receive, aninter prediction parameter and to perform inter prediction based on orusing the inter prediction parameter to obtain an inter prediction block265. Motion compensation, performed by the motion compensation unit, mayinvolve fetching or generating the prediction block based on themotion/block vector determined by motion estimation, possibly performinginterpolations to sub-pixel precision. Interpolation filtering maygenerate additional pixel samples from known pixel samples, thuspotentially increasing the number of candidate prediction blocks thatmay be used to code a picture block. Upon receiving the motion vectorfor the PU of the current picture block, the motion compensation unitmay locate the prediction block to which the motion vector points in oneof the reference picture lists.

Motion compensation unit may also generate syntax elements associatedwith the blocks and the video slice for use by video decoder 30 indecoding the picture blocks of the video slice.

Entropy Coding

The entropy encoding unit 270 is configured to apply, for example, anentropy encoding algorithm or scheme (e.g., a variable length coding(VLC) scheme, an context adaptive VLC scheme (CAVLC), an arithmeticcoding scheme, a binarization, a context adaptive binary arithmeticcoding (CABAC), syntax-based context-adaptive binary arithmetic coding(SBAC), probability interval partitioning entropy (PIPE) coding oranother entropy encoding methodology or technique) or bypass (nocompression) on the quantized coefficients 209, inter predictionparameters, intra prediction parameters, loop filter parameters and/orother syntax elements to obtain encoded picture data 21 which can beoutput via the output 272, e.g., in the form of an encoded bitstream 21,so that, e.g., the video decoder 30 may receive and use the parametersfor decoding. The encoded bitstream 21 may be transmitted to videodecoder 30, or stored in a memory for later transmission or retrieval byvideo decoder 30.

Other structural variations of the video encoder 20 can be used toencode the video stream. For example, a non-transform based encoder 20can quantize the residual signal directly without the transformprocessing unit 206 for certain blocks or frames. In anotherimplementation, an encoder 20 can have the quantization unit 208 and theinverse quantization unit 210 combined into a single unit.

Decoder and Decoding Method

FIG. 3 shows an example of a video decoder 30 that is configured toimplement the techniques of this present application. The video decoder30 is configured to receive encoded picture data 21 (e.g., encodedbitstream 21), e.g., encoded by encoder 20, to obtain a decoded picture331. The encoded picture data or bitstream comprises information fordecoding the encoded picture data, e.g., data that represents pictureblocks of an encoded video slice and associated syntax elements.

In the example of FIG. 3 , the decoder 30 comprises an entropy decodingunit 304, an inverse quantization unit 310, an inverse transformprocessing unit 312, a reconstruction unit 314 (e.g., a summer 314), aloop filter 320, a decoded picture buffer (DPB) 330, an inter predictionunit 344 and an intra prediction unit 354. Inter prediction unit 344 maybe or include a motion compensation unit. Video decoder 30 may, in someexamples, perform a decoding pass generally reciprocal to the encodingpass described with respect to video encoder 100 from FIG. 2 .

As explained with regard to the encoder 20, the inverse quantizationunit 210, the inverse transform processing unit 212, the reconstructionunit 214 the loop filter 220, the decoded picture buffer (DPB) 230, theinter prediction unit 344 and the intra prediction unit 354 are alsoreferred to as forming the “built-in decoder” of video encoder 20.Accordingly, the inverse quantization unit 310 may be identical infunction to the inverse quantization unit 110, the inverse transformprocessing unit 312 may be identical in function to the inversetransform processing unit 212, the reconstruction unit 314 may beidentical in function to reconstruction unit 214, the loop filter 320may be identical in function to the loop filter 220, and the decodedpicture buffer 330 may be identical in function to the decoded picturebuffer 230. Therefore, the explanations provided for the respectiveunits and functions of the video 20 encoder apply correspondingly to therespective units and functions of the video decoder 30.

Entropy Decoding

The entropy decoding unit 304 is configured to parse the bitstream 21(or in general encoded picture data 21) and perform, for example,entropy decoding to the encoded picture data 21 to obtain, e.g.,quantized coefficients 309 and/or decoded coding parameters (not shownin FIG. 3 ), e.g., any or all of inter prediction parameters (e.g.,reference picture index and motion vector), intra prediction parameter(e.g., intra prediction mode or index), transform parameters,quantization parameters, loop filter parameters, and/or other syntaxelements. Entropy decoding unit 304 may be configured to apply thedecoding algorithms or schemes corresponding to the encoding schemes asdescribed with regard to the entropy encoding unit 270 of the encoder20. Entropy decoding unit 304 may be further configured to provide interprediction parameters, intra prediction parameter and/or other syntaxelements to the mode selection unit 360 and other parameters to otherunits of the decoder 30. Video decoder 30 may receive the syntaxelements at the video slice level and/or the video block level.

Inverse Quantization

The inverse quantization unit 310 may be configured to receivequantization parameters (QP) (or in general information related to theinverse quantization) and quantized coefficients from the encodedpicture data 21 (e.g., by parsing and/or decoding, e.g., by entropydecoding unit 304) and to apply based on the quantization parameters aninverse quantization on the decoded quantized coefficients 309 to obtaindequantized coefficients 311, which may also be referred to as transformcoefficients 311. The inverse quantization process may include use of aquantization parameter determined by video encoder 20 for each videoblock in the video slice to determine a degree of quantization and,likewise, a degree of inverse quantization that should be applied.

Inverse Transform

Inverse transform processing unit 312 may be configured to receivedequantized coefficients 311, also referred to as transform coefficients311, and to apply a transform to the dequantized coefficients 311 inorder to obtain reconstructed residual blocks 213 in the sample domain.The reconstructed residual blocks 213 may also be referred to astransform blocks 313. The transform may be an inverse transform, e.g.,an inverse DCT, an inverse DST, an inverse integer transform, or aconceptually similar inverse transform process. The inverse transformprocessing unit 312 may be further configured to receive transformparameters or corresponding information from the encoded picture data 21(e.g., by parsing and/or decoding, e.g., by entropy decoding unit 304)to determine the transform to be applied to the dequantized coefficients311.

Reconstruction

The reconstruction unit 314 (e.g., adder or summer 314) may beconfigured to add the reconstructed residual block 313, to theprediction block 365 to obtain a reconstructed block 315 in the sampledomain, e.g., by adding the sample values of the reconstructed residualblock 313 and the sample values of the prediction block 365.

Filtering

The loop filter unit 320 (either in the coding loop or after the codingloop) is configured to filter the reconstructed block 315 to obtain afiltered block 321, e.g., to smooth pixel transitions, or otherwiseimprove the video quality. The loop filter unit 320 may comprise one ormore loop filters such as a de-blocking filter, a sample-adaptive offset(SAO) filter or one or more other filters, e.g., a bilateral filter, anadaptive loop filter (ALF), a sharpening, a smoothing filters or acollaborative filters, or any combination thereof. Although the loopfilter unit 320 is shown in FIG. 3 as being an in loop filter, in otherconfigurations, the loop filter unit 320 may be implemented as a postloop filter.

Decoded Picture Buffer

The decoded video blocks 321 of a picture are then stored in decodedpicture buffer 330, which stores the decoded pictures 331 as referencepictures for subsequent motion compensation for other pictures and/orfor output respectively display.

The decoder 30 is configured to output the decoded picture 311, e.g.,via output 312, for presentation or viewing to a user.

Prediction

The inter prediction unit 344 may be identical to the inter predictionunit 244 (in particular to the motion compensation unit) and the intraprediction unit 354 may be identical to the inter prediction unit 254 infunction, and performs split or partitioning decisions and predictionbased on the partitioning and/or prediction parameters or respectiveinformation received from the encoded picture data 21 (e.g., by parsingand/or decoding, e.g., by entropy decoding unit 304). Mode selectionunit 360 may be configured to perform the prediction (intra or interprediction) per block based on reconstructed pictures, blocks orrespective samples (filtered or unfiltered) to obtain the predictionblock 365.

When the video slice is coded as an intra coded (I) slice, intraprediction unit 354 of mode selection unit 360 is configured to generateprediction block 365 for a picture block of the current video slicebased on a signaled intra prediction mode and data from previouslydecoded blocks of the current picture. When the video picture is codedas an inter coded (i.e., B, or P) slice, inter prediction unit 344(e.g., motion compensation unit) of mode selection unit 360 isconfigured to produce prediction blocks 365 for a video block of thecurrent video slice based on the motion vectors and other syntaxelements received from entropy decoding unit 304. For inter prediction,the prediction blocks may be produced from one of the reference pictureswithin one of the reference picture lists. Video decoder 30 mayconstruct the reference frame lists, List 0 and List 1, using defaultconstruction techniques based on reference pictures stored in DPB 330.

Mode selection unit 360 is configured to determine the predictioninformation for a video block of the current video slice by parsing themotion vectors and other syntax elements, and uses the predictioninformation to produce the prediction blocks for the current video blockbeing decoded. For example, the mode selection unit 360 uses some of thereceived syntax elements to determine a prediction mode (e.g., intra orinter prediction) used to code the video blocks of the video slice, aninter prediction slice type (e.g., B slice, P slice, or GPB slice),construction information for one or more of the reference picture listsfor the slice, motion vectors for each inter encoded video block of theslice, inter prediction status for each inter coded video block of theslice, and other information to decode the video blocks in the currentvideo slice.

Other variations of the video decoder 30 can be used to decode theencoded picture data 21. For example, the decoder 30 can produce theoutput video stream without the loop filtering unit 320. For example, anon-transform based decoder 30 can inverse-quantize the residual signaldirectly without the inverse-transform processing unit 312 for certainblocks or frames. In another implementation, the video decoder 30 canhave the inverse-quantization unit 310 and the inverse-transformprocessing unit 312 combined into a single unit.

It should be understood that, in the encoder 20 and the decoder 30, aprocessing result of a current step may be further processed and thenoutput to the next step. For example, after interpolation filtering,motion vector derivation or loop filtering, a further operation, such asClip or shift, may be performed on the processing result of theinterpolation filtering, motion vector derivation or loop filtering.

It should be noted that further operations may be applied to the derivedmotion vectors of current block (including but not limit to controlpoint motion vectors of affine mode, sub-block motion vectors in affine,planar, ATMVP modes, temporal motion vectors, and so on). For example,the value of motion vector is constrained to a predefined rangeaccording to its representing bit. If the representing bit of motionvector is bitDepth, then the range is −2{circumflex over( )}(bitDepth-1)˜2{circumflex over ( )}(bitDepth-1)−1, where “A” meansexponentiation. For example, if bitDepth is set equal to 16, the rangeis −32768˜32767; if bitDepth is set equal to 18, the range is−131072˜131071. For example, the value of the derived motion vector(e.g., the MVs of four 4×4 sub-blocks within one 8×8 block) isconstrained such that the max difference between integer parts of thefour 4×4 sub-block MVs is no more than N pixels, such as no more than 1pixel. Here provides two methods for constraining the motion vectoraccording to the bitDepth.

Method 1: remove the overflow MSB (most significant bit) by flowingoperations

ux=(mvx+2^(bitDepth))%2^(bitDepth)  (1)

mvx=(ux>=2^(bitDepth-1)?() ux−2bitDepth):ux  (2)

uy=(mvy+2^(bitDepth))%2^(bitDepth)  (3)

mvy=(uy>=2^(bitDepth-)1)?(uy2^(bitDepth)):uy  (4)

where mvx is a horizontal component of a motion vector of an image blockor a sub-block, mvy is a vertical component of a motion vector of animage block or a sub-block, and ux and uy indicates an intermediatevalue;

For example, if the value of mvx is −32769, after applying formula (1)and (2), the resulting value is 32767. In computer system, decimalnumbers are stored as two's complement. The two's complement of −32769is 1,0111,1111,1111,1111 (17 bits), then the MSB is discarded, so theresulting two's complement is 0111,1111,1111,1111 (decimal number is32767), which is same as the output by applying formula (1) and (2).

ux=(mvpx+mvdx+2^(bitDepth))%2^(bitDepth)  (5)

mvx=(ux>=2^(bitDepth-1))?(ux−2^(bitDepth)):ux  (6)

uy=mvpy+mvdy+2^(bitDepth))%2^(bitDepth)  (7)

mvy=(uy>=2^(bitDepth-1))?(uy−2^(bitDepth)):uy  (8)

The operations may be applied during the sum of mvp and mvd, as shown informula (5) to (8).

Method 2: remove the overflow MSB by clipping the value

vx=Clip3(−2^(bitDepth-1),2^(bitDepth-1) ,vx)

vy=Clip3(−2^(bitDepth-1),2^(bitDepth-1)−1,vy)

where vx is a horizontal component of a motion vector of an image blockor a sub-block, vy is a vertical component of a motion vector of animage block or a sub-block; x, y and z respectively correspond to threeinput value of the MV clipping process, and the definition of functionClip3 is as follow:

${C{lip}3( {x,y,z} )} = \{ \begin{matrix}x & ; & {z < x} \\y & ; & {z > y} \\z & ; & {otherwise}\end{matrix} $

FIG. 4 is a schematic diagram of a video coding device 400 according toan embodiment of the disclosure. The video coding device 400 is suitablefor implementing the disclosed embodiments as described herein. In anembodiment, the video coding device 400 may be a decoder such as videodecoder 30 of FIG. 1A or an encoder such as video encoder 20 of FIG. 1A.

The video coding device 400 comprises ingress ports 410 (or input ports410) and receiver units (Rx) 420 for receiving data; a processor, logicunit, or central processing unit (CPU) 430 to process the data;transmitter units (Tx) 440 and egress ports 450 (or output ports 450)for transmitting the data; and a memory 460 for storing the data. Thevideo coding device 400 may also comprise optical-to-electrical (OE)components and electrical-to-optical (EO) components coupled to theingress ports 410, the receiver units 420, the transmitter units 440,and the egress ports 450 for egress or ingress of optical or electricalsignals.

The processor 430 is implemented by hardware and software. The processor430 may be implemented as one or more CPU chips, cores (e.g., as amulti-core processor), FPGAs, ASICs, and DSPs. The processor 430 is incommunication with the ingress ports 410, receiver units 420,transmitter units 440, egress ports 450, and memory 460. The processor430 comprises a coding module 470. The coding module 470 implements thedisclosed embodiments described above. For instance, the coding module470 implements, processes, prepares, or provides the various codingoperations. The inclusion of the coding module 470 therefore provides asubstantial improvement to the functionality of the video coding device400 and effects a transformation of the video coding device 400 to adifferent state. Alternatively, the coding module 470 is implemented asinstructions stored in the memory 460 and executed by the processor 430.

The memory 460 may comprise one or more disks, tape drives, andsolid-state drives and may be used as an over-flow data storage device,to store programs when such programs are selected for execution, and tostore instructions and data that are read during program execution. Thememory 460 may be, for example, volatile and/or non-volatile and may bea read-only memory (ROM), random access memory (RAM), ternarycontent-addressable memory (TCAM), and/or static random-access memory(SRAM).

FIG. 5 is a simplified block diagram of an apparatus 500 that may beused as either or both of the source device 12 and the destinationdevice 14 from FIG. 1 according to an exemplary embodiment.

A processor 502 in the apparatus 500 can be a central processing unit.Alternatively, the processor 502 can be any other type of device, ormultiple devices, capable of manipulating or processing informationnow-existing or hereafter developed. Although the disclosedimplementations can be practiced with a single processor as shown, e.g.,the processor 502, advantages in speed and efficiency can be achievedusing more than one processor.

A memory 504 in the apparatus 500 can be a read only memory (ROM) deviceor a random access memory (RAM) device in an implementation. Any othersuitable type of storage device can be used as the memory 504. Thememory 504 can include code and data 506 that is accessed by theprocessor 502 using a bus 512. The memory 504 can further include anoperating system 508 and application programs 510, the applicationprograms 510 including at least one program that permits the processor502 to perform the methods described here. For example, the applicationprograms 510 can include applications 1 through N, which further includea video coding application that performs the methods described here.

The apparatus 500 can also include one or more output devices, such as adisplay 518. The display 518 may be, in one example, a touch sensitivedisplay that combines a display with a touch sensitive element that isoperable to sense touch inputs. The display 518 can be coupled to theprocessor 502 via the bus 512.

Although depicted here as a single bus, the bus 512 of the apparatus 500can be composed of multiple buses. Further, the secondary storage 514can be directly coupled to the other components of the apparatus 500 orcan be accessed via a network and can comprise a single integrated unitsuch as a memory card or multiple units such as multiple memory cards.The apparatus 500 can thus be implemented in a wide variety ofconfigurations.

FIG. 6 illustrates a schematic diagram of a plurality of intraprediction modes used in the HEVC UIP scheme. For luminance blocks, theintra prediction modes may comprise up to 36 intra prediction modes,which may include three non-directional modes and 33 directional modes.The non-directional modes may comprise a planar prediction mode, a mean(DC) prediction mode, and a chroma from luma (LM) prediction mode. Theplanar prediction mode may perform predictions by assuming a blockamplitude surface with a horizontal and vertical xslope derived from theboundary of the block. The DC prediction mode may perform predictions byassuming a flat block surface with a value matching the mean value ofthe block boundary. The LM prediction mode may perform predictions byassuming a chroma value for the block matches the luma value for theblock.

FIG. 7A shows an example of 67 intra prediction modes, e.g., as proposedfor Joint Exploration Model (JEM), the plurality of intra predictionmodes of 67 intra prediction modes comprising: planar mode (index 0), dcmode (index 1), and angular modes with indices 2 to 66, wherein the leftbottom angular mode in FIG. 7A refers to index 2 and the numbering ofthe indices being incremented until index 66 being the top right mostangular mode of FIG. 7A.

As described in [B. Bross, J. Chen, S. Liu, Y.-K. Wang, “Versatile VideoCoding (Draft 8)”, JVET-Q2001-v15, March 2020] and shown in FIG. 7B, thenumber of directional intra prediction modes has been significantlyincreased as compared with the directional mode set available inHEVC/H.265 and depicted in FIG. 6 . In addition to reducing the anglebetween neighboring intra directions in comparison to HEVC, new subsetof directional intra prediction modes known as Wide-Angle IntraPrediction (WAIP) modes was added. WAIP intra directions are shown inFIG. 7B by dash lines. Thus, the extended set of directional modesincreases the number of cases where reference sample interpolation isused.

As shown in FIG. 7C, starting from the second version VVC has some modescorresponding to skew intra prediction directions, including wide angleones (shown as dashed lines).

FIG. 8A illustrates reference sample interpolation process prepended byprocedure 801 of calculating the position of reference samples 802 to betreated. Interpolation uses 4-tap finite impulse response (FIR) filters803 with coefficients denoted as c₀, c₁, c₂, and c₃. Alternatively,reference sample smoothing filter 806 with coefficients of [1, 2, 1]/4can be applied to reference samples 805. These processes are followed upby assigning obtained filtered values 804 or 807 to samples in a blockto be predicted.

The sample values for sub-sample (also called as subsample, or subpixel,or sub-pixel) locations are interpolated from the full-sample lumavalues by applying fixed interpolation filters depending on the currentsubsample location.

FIG. 8A illustrates a predicted sample 804 being obtained from referencesamples 802 by convolution operation with interpolation filtercoefficients. The set of reference samples available for intraprediction typically comprises reconstructed samples from below-left,from left side, from top-let, from above side and above-right of theblock being predicted. For an intra prediction mode only a part of thewhole set of reference samples is being used to obtain the predictedsample. Specifically, for a main side of predicted samples comprising Ssamples, just a subset of reference samples comprising S+m−1 samples isbeing used, wherein m is the number of taps of interpolation filter.Generally, for a predicted block of size W×H a set of reference sampleswould typically comprise 2*W+2*H+1 sample (if multi-reference line indexis zero). However, when angular intra prediction mode is not less than34 and in case interpolation filter is a 4-tap FIR filter, a subset ofreference samples would comprise just W+3 samples. For the same case butwhen angular intra prediction mode is less than 34, the number ofsamples in the subset of reference samples is just H+3.

FIG. 8B illustrates the basic idea behind sub-sample interpolation formotion compensation. A 2-dimentional filtering is used to get apredictor that is located at sub-sample positions within a referenceblock. These sub-sample positions are denoted by lower-case letters suchas a_(0,0), b_(0,0), c_(0,0), d_(0,0), e_(0,0), a_(0,−1), a_(−1,−1),etc. In general, interpolation filters used in motion compensation aredifferent for luma and chroma blocks. In addition, interpolation filterselection can depend on motion type (in particular, whether affinemotion model is applied to a block or not).

It is worth noting that one of two 1-dimentional 4-tap interpolationfilters for angular intra prediction of luma blocks and 2-dimentionalinterpolation filter for motion compensation of chroma blocks use thesame filter coefficients in the current VVC design shown in FIG. 8C. Thevalues of these filter coefficients are given in Table 1 and Table 2.

TABLE 1 Specification of interpolation filter coefficients fC Fractionalsample fC interpolation filter coefficients position p f_(C)[ p ][ 0 ]f_(C)[ p ][ 1 ] f_(C)[ p ][ 2 ] f_(C)[ p ][ 3 ] 0 0 64 0 0 1 −1 63 2 0 2−2 62 4 0 3 −2 60 7 −1 4 −2 58 10 −2 5 −3 57 12 −2 6 −4 56 14 −2 7 −4 5515 −2 8 −4 54 16 −2 9 −5 53 18 −2 10 −6 52 20 −2 11 −6 49 24 −3 12 −6 4628 −4 13 −5 44 29 −4 14 −4 42 30 −4 15 −4 39 33 −4 16 −4 36 36 −4 17 −433 39 −4 18 −4 30 42 −4 19 −4 29 44 −5 20 −4 28 46 −6 21 −3 24 49 −6 22−2 20 52 −6 23 −2 18 53 −5 24 −2 16 54 −4 25 −2 15 55 −4 26 −2 14 56 −427 −2 12 57 −3 28 −2 10 58 −2 29 −1 7 60 −2 30 0 4 62 −2 31 0 2 63 −1

TABLE 2 Specification of the chroma interpolation filter coefficientsf_(C)[ p ] for each 1/32 fractional sample position p Fractional sampleinterpolation filter coefficients position p f_(C)[ p ][ 0 ] f_(C)[ p ][1 ] f_(C)[ p ][ 2 ] f_(C)[ p ][ 3 ] 1 −1 63 2 0 2 −2 62 4 0 3 −2 60 7 −14 −2 58 10 −2 5 −3 57 12 −2 6 −4 56 14 −2 7 −4 55 15 −2 8 −4 54 16 −2 9−5 53 18 −2 10 −6 52 20 −2 11 −6 49 24 −3 12 −6 46 28 −4 13 −5 44 29 −414 −4 42 30 −4 15 −4 39 33 −4 16 −4 36 36 −4 17 −4 33 39 −4 18 −4 30 42−4 19 −4 29 44 −5 20 −4 28 46 −6 21 −3 24 49 −6 22 −2 20 52 −6 23 −2 1853 −5 24 −2 16 54 −4 25 −2 15 55 −4 26 −2 14 56 −4 27 −2 12 57 −3 28 −210 58 −2 29 −1 7 60 −2 30 0 4 62 −2 31 0 2 63 −1

For any of these modes, to predict samples within a block interpolationof a set of neighboring reference samples should be performed, if acorresponding position within a block side is fractional. HEVC and VVCuses linear interpolation between two adjacent reference samples. JEMuses more sophisticated 4-tap interpolation filters. Filter coefficientsare selected to be either Gaussian or Cubic ones depending on the widthor on the height value. Decision on whether to use width or height isharmonized with the decision on main reference side selection: whenintra prediction mode is greater or equal to diagonal mode, top side ofreference samples is selected to be the main reference side and widthvalue is selected to determine interpolation filter in use. Otherwise,main side reference is selected from the left side of the block andheight controls the filter selection process. Specifically, if selectedside length is smaller than or equal to 8 samples, Cubic interpolation 4tap is applied. Otherwise, interpolation filter is a 4-tap Gaussian one.

Similar to inter prediction, intra prediction can require interpolationfiltering when samples within a block are predicted according to afractional-slope directional mode. If linear filter is used for thispurpose, filter coefficients can be easily calculated if a sample in ablock to be predicted falls into a fractional (sub-pel) position withinreference samples. So, linear filter does not require a LUT (Look-UpTable) for storing its coefficient. Nevertheless, it can be used ratherthan direct calculation. However, if a prediction module uses long-tap(e.g., 4- or 8-tap) interpolation filters, it can require a LUT to keepcoefficient of interpolation filters like done in inter-predictionmodule where 8-tap DCT-IF for luma and 4-tap DCT-IF for chroma aretabulated as shown in Table 3 and Table 4, respectively.

TABLE 3 Specification of the luma inter-prediction interpolation filtercoefficients f_(L)[ p ] for each 1/16 fractional sample position p.Fractional sample interpolation filter coefficients position pf_(L)[p][0] f_(L)[p][1] f_(L)[p][2] f_(L)[p][3] f_(L)[p][4] f_(L)[p][5]f_(L)[p][6] f_(L)[p][7] 1 0 1 −3 63 4 −2 1 0 2 −1 2 −5 62 8 −3 1 0 3 −13 −8 60 13 −4 1 0 4 −1 4 −10 58 17 −5 1 0 5 −1 4 −11 52 26 −8 3 −1 6 −13 −9 47 31 −10 4 −1 7 −1 4 −11 45 34 −10 4 −1 8 −1 4 −11 40 40 −11 4 −19 −1 4 −10 34 45 −11 4 −1 10 −1 4 −10 31 47 −9 3 −1 11 −1 3 −8 26 52 −114 −1 12 0 1 −5 17 58 −10 4 −1 13 0 1 −4 13 60 −8 3 −1 14 0 1 −3 8 62 −52 −1 15 0 1 −2 4 63 −3 1 0

TABLE 4 Specification of the chroma inter-prediction interpolationfilter coefficients f_(C)[p] for each 1/32 fractional sample position p.Fractional sample interpolation filter coefficients position p f_(C)[ p][ 0 ] f_(C)[ p ][ 1 ] f_(C)[ p ][ 2 ] f_(C)[ p ][ 3 ] 1 −1 63 2 0 2 −262 4 0 3 −2 60 7 −1 4 −2 58 10 −2 5 −3 57 12 −2 6 −4 56 14 −2 7 −4 55 15−2 8 −4 54 16 −2 9 −5 53 18 −2 10 −6 52 20 −2 11 −6 49 24 −3 12 −6 46 28−4 13 −5 44 29 −4 14 −4 42 30 −4 15 −4 39 33 −4 16 −4 36 36 −4 17 −4 3339 −4 18 −4 30 42 −4 19 −4 29 44 −5 20 −4 28 46 −6 21 −3 24 49 −6 22 −220 52 −6 23 −2 18 53 −5 24 −2 16 54 −4 25 −2 15 55 −4 26 −2 14 56 −4 27−2 12 57 −3 28 −2 10 58 −2 29 −1 7 60 −2 30 0 4 62 −2 31 0 2 63 −1

Particular set of coefficients could be defined as shown in Table 5.

TABLE 5 Specification of intra-prediction interpolation filtercoefficients fC and fG as described in the VVC spec draft of version 3.Fractional sample fC interpolation filter coefficients fG interpolationfilter coefficients position p fc[p][0] fc[p][1] fc[p][2] fc[p][3]fG[p][0] fG[p][1] fG[p][2] fG[p][3] 0 0 64 0 0 16 32 16 0 1 −1 63 2 0 1529 17 3 2 −2 62 4 0 15 29 17 3 3 −2 60 7 −1 14 29 18 3 4 −2 58 10 −2 1329 18 4 5 −3 57 12 −2 13 28 19 4 6 −4 56 14 −2 13 28 19 4 7 −4 55 15 −212 28 20 4 8 −4 54 16 −2 11 28 20 5 9 −5 53 18 −2 11 27 21 5 10 −6 52 20−2 10 27 22 5 11 −6 49 24 −3 9 27 22 6 12 −6 46 28 −4 9 26 23 6 13 −5 4429 −4 9 26 23 6 14 −4 42 30 −4 8 25 24 7 15 −4 39 33 −4 8 25 24 7 16 −436 36 −4 8 24 24 8 17 −4 33 39 −4 7 24 25 8 18 −4 30 42 −4 7 24 25 8 19−4 29 44 −5 6 23 26 9 20 −4 28 46 −6 6 23 26 9 21 −3 24 49 −6 6 22 27 922 −2 20 52 −6 5 22 27 10 23 −2 18 53 −5 5 21 27 11 24 −2 16 54 −4 5 2028 11 25 −2 15 55 −4 4 20 28 12 26 −2 14 56 −4 4 19 28 13 27 −2 12 57 −34 19 28 13 28 −2 10 58 −2 4 18 29 13 29 −1 7 60 −2 3 18 29 14 30 0 4 62−2 3 17 29 15 31 0 2 63 −1 3 17 29 15

Intra-predicted sample is calculated by convoluting with coefficientsdefined in accordance with subsample offset and filter type as follows:

s(x)=(Σ=(Σ_(i=0) ^(i<4)(“ref”_(i+x) ·c _(i))+32)>>6.

In this equation “>>” indicates a bitwise shift-right operation.

A set of coefficients {c_(i)} is fetched from a lookup-table (LUT).Table 5 gives an example of the values stored in accordance with thecurrent design of VVC described in the spec draft of version 3(JVET-L1001 “Versatile Video Coding (Draft 3)”). The selection betweensmoothing (fG) and sharpening (fC) interpolation filters is performedusing Mode-Dependent Intra Smoothing (MDIS) conditions. So, either fC orfG can be used to generate predicted samples of a block.

If sharpening filter is selected, predicted sample s(x) is furtherclipped to the allowed range of values, that is either defined using SPSor derived from the bit depth of the selected component.

For some use-cases, it can be beneficial to avoid keeping explicit LUTsfor interpolation filters, since LUT handling requires additional memoryand thus increases energy consumption as well as die size. The 1^(st)one is critical for mobile applications. The 2^(nd) one adverselyaffects price.

For the mentioned use-cases, it is reasonable to analytically definecoefficients of interpolation filters. Instead of performing a fetchfrom a LUT, filter coefficients could be calculated from the inputfractional sample position p.

According to an embodiment of the present disclosure, a method isprovided for intra- or inter-prediction processing of a video frame,comprising the steps of: obtaining a reference sample; obtaining a valueof a subsample offset; and filtering, using a subsample 4-tapinterpolation filter, the reference sample to obtain a predicted samplevalue, where filter coefficients of the subsample 4-tap interpolationfilter are defined in a table 6 as follows, or where filter coefficientsof the subsample 4-tap interpolation filter satisfy:

$c_{0} = {{16} - \frac{p}{2}}$ $c_{1} = {{16} + {16} - \frac{p}{2}}$$c_{2} = {{16} + \frac{p}{2}}$ $c_{3} = \frac{p}{2}$

wherein p is a fractional part of the value of subsample offset, and c₀,c₁, c₂, and c₃ are the filter coefficients of the subsample 4-tapinterpolation filer.

In one exemplary implementation, the reference samples(s) may bereferred to as ref[x], with

ref[x]=p[−1−refIdx+x][−1−refIdx],with x=0 . . . nTbW+refIdx+1,

corresponding an array of reference samples and “p” referring a x-ytwo-dimensional array p[x][y] containing sample values. The number ofreference samples used may be at least one. In another example, thenumber of reference samples may be four.

In one exemplary implementation, the obtained subsample offset value maybe referred to as

(y+1+refIdx)*intraPredAngle

with “IntraPredAngle” being the value of an intra-prediction angle.

In one exemplary implementation, the predicted sample value “predSamples[x][y]” may be obtained by

predSamples[x][y]=Clip1(((Σ_(i=0) ³ fT[i]*ref[x+iIdx+i])+32)>>6)

with fT[i] referring to filter coefficients. These coefficients may beluma- or chroma filter coefficients for the inter-prediction, referredto as fG and fC respectively.

The selection of the filter coefficients being luma or chroma may beimplemented by use and setting of a flag “filterFlag”, for example, as

fT[j]=filterFlag?fG[iFact][j]:fC[iFact][j]

with

iFact=((y+1+refIdx)*intraPredAngle)&31.

The value “31” refers to the fractional part of the subsample offsetvalue, and may take other values different from “31”. The values of thefilter coefficients fG (luma) and/or fC (chroma) by be obtainedanalytically on-the-fly using the above analytical expression for thefilter coefficients of the 4-tap filter. Thus, the filter coefficientsare defined according to the subsample offset value.

The filter coefficients are hence obtained without accessing therespective values of the filter coefficients from a LUT, but rather areobtained by calculation.

Alternatively, the filter coefficients may be calculated using the aboveequations, and the values may be stored in a LUT.

According to an embodiment of the present disclosure, the filtercoefficients of the subsample 4-tap interpolation filter are defined ina table 6 as follows:

TABLE 6 filter coefficients of the subsample 4-tap interpolation filterp c₀ c₁ c₂ c₃ 0 16 32 16 0 1 16 32 16 0 2 15 31 17 1 3 15 31 17 1 4 1430 18 2 5 14 30 18 2 6 13 29 19 3 7 13 29 19 3 8 12 28 20 4 9 12 28 20 410 11 27 21 5 11 11 27 21 5 12 10 26 22 6 13 10 26 22 6 14 9 25 23 7 159 25 23 7 16 8 24 24 8 17 8 24 24 8 18 7 23 25 9 19 7 23 25 9 20 6 22 2610 21 6 22 26 10 22 5 21 27 11 23 5 21 27 11 24 4 20 28 12 25 4 20 28 1226 3 19 29 13 27 3 19 29 13 28 2 18 30 14 29 2 18 30 14 30 1 17 31 15 311 17 31 15

In one exemplary implementation, the values of the filter coefficientsmay be stored in a LUT. This means that for the subsample interpolationfiltering the respective values of the filter coefficients are to befetched from the LUT.

In one embodiment, in FIG. 9 , a set of reference samples are inputtedto the interpolation filter.

In one embodiment, for the case of smoothing interpolation filter, thevalue of phase parameter P is the same as the value of fractional sampleposition p. In FIG. 9 , blocks F1 and F2 represent linear interpolationfilters. The coefficients for each of these filters are expressed fromthe phase parameter p as follows:

${c_{0} = {{16} - \frac{p}{2}}},$ $c_{1} = {\frac{p}{2}.}$

In an example, here and further, the division operation could be definedwith or without rounding, i.e.:

${\frac{a}{2^{n}} = {a \gg n}},{or}$${\frac{a}{2^{n}} = {( {a + 2^{n - 1}} ) \gg n}},$

wherein “a” is a division nominator and “n” is a power of two parameterof the denominator.

Block F3 represents a two-tap low-pass filter, having constantcoefficients:

c ₀=16,

c ₁=16.

In an example, filters F1 . . . F3 are non-normalized, F3 have a higherDC gain than F1 and F3 have a higher DC gain than F2.

The output of filters F1 . . . F3 are summed up and normalized.Normalization (block “>>”) could be performed, e.g., by aright-shifting, or by division with rounding as described above.

The resulting equation for this combination (equivalent 4-tap filter) isexpressed as follows:

$\{ \begin{matrix}{c_{0} = {{16} - \frac{p}{2}}} \\{c_{1} = {{16} + {16} - \frac{p}{2}}} \\{c_{2} = {{16} + \frac{p}{2}}} \\{c_{3} = \frac{p}{2}}\end{matrix} $

This embodiment enables a LUT-based implementation. According to thisimplementation, the coefficient values could also be defined using aLUT. The values stored in this LUT are defined using Table 7 (for bothcases: with and without rounding).

TABLE 7 Specification of intra-prediction interpolation filtercoefficient of smoothing filter. With rounding Without rounding p c₀ c₁c₂ c₃ c₀ c₁ c₂ c₃ 0 16 32 16 0 16 32 16 0 1 15 31 17 1 16 32 16 0 2 1531 17 1 15 31 17 1 3 14 30 18 2 15 31 17 1 4 14 30 18 2 14 30 18 2 5 1329 19 3 14 30 18 2 6 13 29 19 3 13 29 19 3 7 12 28 20 4 13 29 19 3 8 1228 20 4 12 28 20 4 9 11 27 21 5 12 28 20 4 10 11 27 21 5 11 27 21 5 1110 26 22 6 11 27 21 5 12 10 26 22 6 10 26 22 6 13 9 25 23 7 10 26 22 614 9 25 23 7 9 25 23 7 15 8 24 24 8 9 25 23 7 16 8 24 24 8 8 24 24 8 177 23 25 9 8 24 24 8 18 7 23 25 9 7 23 25 9 19 6 22 26 10 7 23 25 9 20 622 26 10 6 22 26 10 21 5 21 27 11 6 22 26 10 22 5 21 27 11 5 21 27 11 234 20 28 12 5 21 27 11 24 4 20 28 12 4 20 28 12 25 3 19 29 13 4 20 28 1226 3 19 29 13 3 19 29 13 27 2 18 30 14 3 19 29 13 28 2 18 30 14 2 18 3014 29 1 17 31 15 2 18 30 14 30 1 17 31 15 1 17 31 15 31 0 16 32 16 1 1731 15

From Table 7 it could be noticed that the coefficients are within arange of [0, 31]. This fact explains the technical benefit of thedisclosure that includes the possibility to use 16-bit multipliers forthe 8-bit and 10-bit pictures that are used and will be used, at least,in the mid-term perspective, most frequently. A typical implementationof the disclosure would comprise four parallel multiplicationoperations, wherein the operands of multiplication have bit depths of,at maximum, 6 for filter coefficients and 10 for samples. The result ofthe multiplication would not exceed a 16-bit value, thus making theproposed coefficients friendly from implementation point of view.

In inter-prediction mode, a block motion compensation is performed.Motion compensation might comprise a step of interpolation filtering,which is similar to intra-interpolation filtering. Another beneficialproperty of the disclosure is that the coefficients of interpolationfilters have the same precision (i.e., the bit-depth of thecoefficients' values is the same) for both intra- and inter-predictionmodes. If the precision of interpolation filter coefficients is higherin intra prediction case, it can adversely affect the computationalcomplexity of a video codec. The reason is that intra-prediction isinherently sequential as it requires reconstructed samples of previousblocks. In contrast, inter-prediction can be carried out in parallel.Hence, if the precision of interpolation is higher for intra-predictionthan for inter, that can deepen the implementation misbalance betweenintra- and inter-prediction pipelines. This alignment of precisionenables to avoid such negative consequences.

Another benefit of the proposed disclosure is in reduction of thediversity of the coefficients. Considering that pairs of neighboringrows of Table 7 are identical, a practical implementation of thedisclosure would fetch from a LUT that have just 16 rows (the rowscorresponding to even values of p in the “Without rounding” case, andthe rows corresponding to odd values of p in the “With rounding” case)instead of 32 rows.

A technical effect of the disclosure is that it enables, at least, thefollowing types of implementations:

-   -   LUT-free implementations that compute filter coefficients using        values of p, wherein the computation is based on the analytical        equations described above; and    -   LUT-based implementations that fetch filter coefficients from a        LUT using an index value based on a value of p.

The precision of the value of p is reduced when computing the values ofthe coefficients. In particular, the value of coefficients are derivedbased on the result of the integer division by 2, i.e.,

$\frac{p}{2}$

that can be implemented as a right shift by 1, which is simplyimplementable in hardware. For LUT-based implementations, this precisionreduction results in the reduction of the memory required to store theLUT. In hardware, this would also reduce the number of wires of anaddress bus of the LUT.

In one embodiment, for the case of sharpening interpolation filter, astrength parameter S is defined as follows:

$S = {\frac{48 - {❘{{3p} - 48}❘}}{8}.}$

This strength parameter S is defined to have a maximum value at thehalf-pel position (p=16). For the subsample positions close to integerones, strength parameter S has a lower value. An exemplary combinationof filters is shown in FIG. 10 . Block F1 in this figure represents alinear filter, with its coefficients defined as follows:

c ₀=64−(p<<1),

c ₁ =p<<1.

Block F2 represents a high-pass filter having the followingcoefficients:

c ₀=−1

c ₁=1

c ₂=1

c ₃=−1

The output of block F2 is being multiplied by a strength parameter S.The result of the multiplication is further summed up with the output oflinear filter F1, and the resulting sum is normalized.

The resulting equation for this combination (equivalent 4-tap filter) isexpressed as follows:

c ₀ =−S

c ₁=64−(p<<1)+S

c ₂=(p<<1)+S

c ₃ =−S

For this equation, a LUT-based implementation is also possible. Table 8gives the values of the coefficients.

TABLE 8 Specification of intra-prediction interpolation filtercoefficient of sharpening filter p c₀ c₁ c₂ c₃ 0 0 64 0 0 1 0 62 2 0 2 060 4 0 3 −1 59 7 −1 4 −1 57 9 −1 5 −1 55 11 −1 6 −2 54 14 −2 7 −2 52 16−2 8 −3 51 19 −3 9 −3 49 21 −3 10 −3 47 23 −3 11 −4 46 26 −4 12 −4 44 28−4 13 −4 42 30 −4 14 −5 41 33 −5 15 −5 39 35 −5 16 −6 38 38 −6 17 −5 3539 −5 18 −5 33 41 −5 19 −4 30 42 −4 20 −4 28 44 −4 21 −4 26 46 −4 22 −323 47 −3 23 −3 21 49 −3 24 −3 19 51 −3 25 −2 16 52 −2 26 −2 14 54 −2 27−1 11 55 −1 28 −1 9 57 −1 29 −1 7 59 −1 30 0 4 60 0 31 0 2 62 0

As filter F2 has negative coefficients, the normalized result is furtherclipped to fit in the range of allowed values that could be eithersignaled in the SPS or derived from the samples' bit depth.

An alternative embodiment is to specify alternative position of theclipping operation (see FIG. 11 ). This alternative design is based onthat linear filter F1 may not have an output value that is lower orhigher than any of its input values.

In one embodiment, clipping block operates using the following steps.

Step one is to determine to perform minimum thresholding or maximumthresholding.

Step two depends on the result of step one. Specifically, either minimumor maximum thresholding is performed.

Minimum thresholding is applied in case when the input to the clippingblock is negative. Otherwise, maximum thresholding is applied. Theoutput v of step two (and of the clipping block) could be defined asfollows:

$v_{c} = \{ {\begin{matrix}{{v < 0},v_{cmin}} \\{{otherwise},v_{cmax}}\end{matrix}.} $

For an input value v, the output of minimum thresholding ν_(cmin) iscalculated as follows:

$v_{cmin} = {- {{\min( {{- v},\frac{\min( {{ref}_{x},{ref}_{x - 1}} )}{S}} )}.}}$

The output of maximum thresholding is calculated as follows:

${v_{cmax} = {\min( {v,\frac{p_{\max} - {\max( {{ref}_{x},{ref}_{x - 1}} )}}{S}} )}},$

wherein p_(max) is the maximum value of the range of allowed value ofthe sample.

Values ref_(x) and ref_(x-1) are input reference samples shown in FIG.11 , that are an input of the linear filter F1.

In one embodiment, in case clipping is performed after multiplicationoperation, ν_(c) is calculated as follows:

$v_{c} = \{ {\begin{matrix}{{v < 0},{- {\min( {{- v},{\min( {{ref}_{x},{ref}_{x - 1}} )}} )}}} \\{{otherwise},{\min( {v,{p_{\max} - {\max( {{ref}_{x},{ref}_{x - 1}} )}}} )}}\end{matrix}.} $

In some embodiments, filter F3 in FIG. 9 , filter F2 in FIG. 10 and FIG.11 may not depend on the phase parameter P. These embodiments simplifiesimplementation as output of these filters may be same for each input rowof predicted samples, thus this step could be performed before startinginterpolation process, e.g., at the stage of reference sample filteringprocess. This approach increases parallelism and thus reduces latency ofdirectional filtering.

Another alternative embodiment (see FIG. 12 ) uses filter of adjustablestrength, not just multiplier of the filter output. FIG. 12A shows thecase when clipping is performed for the output of the high-pass filterF2. FIG. 12B shows the case when clipping is performed for the output ofthe normalized output of the combination of F1 and F2. Example offilters of adjustable strength could be as follows: bilateral filter,inverse transform filter, etc.

Another embodiment uses reduced resolution of p, i.e., only 16 out of 32entries is used. This is achieved by, e.g., setting least significantbit of p to zero.

As shown in FIGS. 13-21 , different combinations of LUT-based andanalytic representations of interpolation filter coefficients arepossible for both intra- and inter-prediction. For examples, FIG. 14illustrates the use-case where coefficients for smoothing interpolationfilter used in intra-prediction case are computed whereas coefficientsfor other interpolation filters for both intra- and inter-prediction arestored in LUTs. In addition, the video coding specification can includeboth LUT-based and analytic representations of interpolation filtercoefficients to enable different implementations. If bothrepresentations are described, the LUT-based and the analyticrepresentations should provide identical coefficients.

FIG. 22 represents an implementation of the coefficients calculationmethod.

In equation

c ₀ =−S

c ₁=64−(p<<1)+S

c ₂=(p<<1)+S

c ₃ =−S

a strength parameter S is defined as follows:

$S = {\frac{48 - {❘{{3p} - 48}❘}}{8}.}$

This implementation corresponds to the different way to derive strengthparameter S (denoted as a resulting value of “q” in FIG. 22 ). The valueof fractional sample position p is forwarded into the demultiplexerDEMUX that is controlled by the input 1-bit signal SEL, which is set tothe value of the 5th least significant bit of p (having and index of 4if indexing starts from zero). If this bit is equal to “1”, SEL signalindicates that the value of p is greater than 16 and the following valueshould be calculated:

q=−(not(31xor p)),

where “not” and “xor” are bitwise NOT and XOR operations, respectively.This expression is tantamount to q=(32-p) and can be written in theC/C++ programming languages as

q=−(˜(0x1F{circumflex over ( )}p)).

Otherwise (i.e., if the input signal SEL of the demultiplexer DEMUXequals “0”), any calculations are bypassed and the signal p is forwardedto the multiplexer MUX like the signal q. The output signal r of themultiplexer MUX is passed to the module that computes the value of t asfollows:

t=((r<<1)+r)>>3,

where “<<” and “>>” are left and right shift operations, respectively.

In fact, this value of t is a strength parameter S. Further optimizationis possible by performing steps shown in FIG. 22 in parallel with theone of coefficients of linear filter:

z=(64−(p<<1))

As soon as values of both z and S have been computed, they can be addedto one another to obtain c₁=z+S.

Conventional intra prediction methods use an FIR filter to obtainpredicted samples from the set of reference samples reference samples.Coefficients of the FIR filter are selected in accordance with thefractional position p defined for a row or a column of predictedsamples.

In embodiments of the proposed disclosure, the set of FIR coefficientsis a result of combination of filter sets. FIG. 23 shows steps of howthis combination could be performed.

Filter set 2306 is initialized by the values of one of the known filters(also called input filter sets, or pre-defined filter sets), forexample, by coefficients of Filter 2 given in below Table 9.

The next steps shown in FIG. 23 are performed for each value ofsubsample position 2301 (denoted as “p”) thus resulting in the updatedcoefficients set 2306.

Exemplary filter sets at step 2302 for the described embodiments couldcomprise the ones defined in Table 9.

The second step 2303 is to evaluate whether coefficients for a givenvalue of subsample position should be updated. In one of theembodiments, the evaluation method is performed as follows.

A reference signal s(x) is defined for integer values of x as a stepfunction:

${s(x)} = \{ {\begin{matrix}{v_{0},{x < t}} \\{v_{1},{x \geq t}}\end{matrix}.} $

In the definition above, the threshold value t could be set is equal to8 and step levels ν₀ and vi are equal to 0 and 255 respectively. Infact, selection of level values affects only accuracy of the obtainedresult.

As another example, the reference signal is defined as

round(A*cos(Nπx/T)),

wherein A is a nonzero value, T is an integer value equal to the numberof samples in the reference signal minus one, x is a set of integervalues, x ∈ [0, T], N is an integer value,

$N \leq {\frac{T}{2}.}$

For the defined reference signal s(x), a set of filtered signalss_(F)(p,x) are obtained as shown in FIG. 24 . FIG. 25A shows theexemplary reference signal s(x); FIG. 25B shows the filtered signals_(F)(p,x) when p is set to 1. It could be noticed that magnitude inposition 2501 is decreased after the signal is filtered. Rows of theimage shown in FIG. 25C illustrate the set of filtered signals. Darkerareas correspond to smaller magnitude values, and lighter valuescorrespond to higher magnitude values.

The estimation method at step 2303 of FIG. 23 is based on evaluation ofmagnitude decrease in position 2501 that occurs for different values ofsubsample position p (see FIG. 26 ). For a set of values s_(F)(p,x₀),x₀=t, an average function 2602 is estimated. For example, moving averagemethod or linear regression methods could be used. Result of estimationis an aggregate function over the values of differences 2603 betweens_(F)(p,x₀) (2601) and the average function 2602. For example, aggregatefunction could be specified as a sum of squares or a sum of absolutevalues.

An example of the estimation method may include the following steps:

-   -   Define a reference signal s(x);    -   Initialize an output filter set by one of the input filter sets;    -   obtain a set of filtered signals s_(F)(p,x) for a set of        subsample position “p” by convolving the reference signal s(x)        with a filter of the output filter set that corresponds to the        subsample position “p” value;    -   define the ideal line r(p) for a given value of x;    -   obtain the value of an aggregate function (A1) as the estimation        of distance between the ideal line r(p) and values of s_(F)(p,x)        for the given value of x;    -   perform the following substeps for a set of input filters, each        of the substeps is performed for a subsample position “p₀”        value:        -   obtain the filtered reference signal by convolving the            reference signal s(x) with an input filter belonging to the            set of input filters;        -   obtain the value of an aggregate function (A2) as the            estimation of distance between the ideal line r(p) and            values of s_(F)(p,x) for the given value of x, wherein            s_(F)(p₀,x) is the filtered reference signal obtained by            applying the input filter;        -   ▪ replace the filter of the output filter set corresponding            to the subsample position “p₀” with the input filter when            the value of an aggregate function for the input filter (A2)            is smaller than the value of an aggregate function for the            current filter (A1) of an output filter set.

The next step 2304 shown in FIG. 23 includes selecting coefficients 2305based on the results of estimation 2303. Particularly, coefficients thatprovide the minimum value of the aggregate function replace coefficientsof the resulting filter set 2306 that are specified for subpixelposition p 2301.

As one example, the value of the aggregate function for the currentfilter of the output filter set is a sum of absolute values ofdifferences calculated for a set of subsample positions {p}, eachdifference is obtained for a subsample position p by subtracting thevalue of an deal line at the subsample position p and a filteredreference signal at a given spatial position x, wherein the filteredreference signal is obtained by convolving reference signal with afilter corresponding to the subsample position p.

As another example, the value of the aggregate function for the currentfilter of the output filter set is a sum of squared differencescalculated for a set of subsample positions {p}, each difference isobtained for a subsample position p by subtracting the value of an dealline at the subsample position p and a filtered reference signal at agiven spatial position x, wherein the filtered reference signal isobtained by convolving reference signal with a filter corresponding tothe subsample position p.

When coefficients of 2306 are modified, estimation step may providedifferent results. Therefore the steps shown in FIG. 23 may be repeatednot just for all the values of p, but estimation for the same set of pvalues may be repeated several times to make the selected coefficientsmore consistent.

As the results of the described steps for the filters listed in Table 9,the following filter set was obtained (see Table 10). Alternativedesigns may provide different filter sets 2306 (see Table 11 and Table12).

TABLE 9 conventional filter coefficients. Subsample Filter 1 Filter 2offset p c₀ c₁ c₂ c₃ c₀ c₁ c₂ c₃ 0 0 64 0 0 0 64 0 0 1 −1 63 2 0 0 61 4−1 2 −2 62 4 0 −1 61 5 −1 3 −2 60 7 −1 −1 59 7 −1 4 −2 58 10 −2 −2 58 10−2 5 −3 57 12 −2 −2 56 12 −2 6 −4 56 14 −2 −3 55 15 −3 7 −4 55 15 −2 −353 17 −3 8 −4 54 16 −2 −3 51 19 −3 9 −5 53 18 −2 −4 50 22 −4 10 −6 52 20−2 −4 48 24 −4 11 −6 49 24 −3 −4 46 26 −4 12 −6 46 28 −4 −5 45 29 −5 13−5 44 29 −4 −4 42 30 −4 14 −4 42 30 −4 −4 40 32 −4 15 −4 39 33 −4 −4 3834 −4 16 −4 36 36 −4 −5 37 37 −5 17 −4 33 39 −4 −4 34 38 −4 18 −4 30 42−4 −4 32 40 −4 19 −4 29 44 −5 −4 30 42 −4 20 −4 28 46 −6 −5 29 45 −5 21−3 24 49 −6 −4 26 46 −4 22 −2 20 52 −6 −4 24 48 −4 23 −2 18 53 −5 −4 2250 −4 24 −2 16 54 −4 −3 19 51 −3 25 −2 15 55 −4 −3 17 53 −3 26 −2 14 56−4 −3 15 55 −3 27 −2 12 57 −3 −2 12 56 −2 28 −2 10 58 −2 −2 10 58 −2 29−1 7 60 −2 −1 7 59 −1 30 0 4 62 −2 −1 5 61 −1 31 0 2 63 −1 −1 4 61 0

TABLE 10 Obtained filter set Subsample Filter 1 offset p c₀ c₁ c₂ c₃ 0 064 0 0 1 −1 63 2 0 2 −1 61 5 −1 3 −1 59 7 −1 4 −2 58 10 −2 5 −2 56 12 −26 −3 55 15 −3 7 −3 53 17 −3 8 −3 51 19 −3 9 −4 50 22 −4 10 −4 48 24 −411 −4 46 26 −4 12 −5 45 29 −5 13 −4 42 30 −4 14 −4 40 32 −4 15 −4 38 34−4 16 −5 37 37 −5 17 −4 34 38 −4 18 −4 32 40 −4 19 −4 30 42 −4 20 −5 2945 −5 21 −4 26 46 −4 22 −4 24 48 −4 23 −4 22 50 −4 24 −3 19 51 −3 25 −317 53 −3 26 −3 15 55 −3 27 −2 12 56 −2 28 −2 10 58 −2 29 −1 7 59 −1 30−1 5 61 −1 31 −1 4 61 0

TABLE 11 Obtained filter set of alternative design 1 Subsample Filter 1offset p c₀ c₁ c₂ c₃ 0 0 64 0 0 1 −1 63 3 −1 2 −1 61 5 −1 3 −1 59 7 −1 4−2 58 10 −2 5 −2 56 12 −2 6 −3 55 15 −3 7 −3 53 17 −3 8 −3 51 19 −3 9 −450 22 −4 10 −4 48 24 −4 11 −4 46 26 −4 12 −5 45 29 −5 13 −4 42 30 −4 14−4 40 32 −4 15 −4 38 34 −4 16 −5 37 37 −5 17 −4 34 38 −4 18 −4 32 40 −419 −4 30 42 −4 20 −5 29 45 −5 21 −4 26 46 −4 22 −4 24 48 −4 23 −4 22 50−4 24 −3 19 51 −3 25 −3 17 53 −3 26 −3 15 55 −3 27 −2 12 56 −2 28 −2 1058 −2 29 −1 7 59 −1 30 −1 5 61 −1 31 −1 4 61 0

TABLE 12 Obtained filter set of alternative design 2 Subsample Filter 1offset p c₀ c₁ c₂ c₃ 0 0 64 0 0 1 −1 62 4 −1 2 −1 61 5 −1 3 −1 59 7 −1 4−2 58 10 −2 5 −2 56 12 −2 6 −3 55 15 −3 7 −3 53 17 −3 8 −3 51 19 −3 9 −450 22 −4 10 −4 48 24 −4 11 −4 46 26 −4 12 −5 45 29 −5 13 −4 42 30 −4 14−4 40 32 −4 15 −4 38 34 −4 16 −5 37 37 −5 17 −4 34 38 −4 18 −4 32 40 −419 −4 30 42 −4 20 −5 29 45 −5 21 −4 26 46 −4 22 −4 24 48 −4 23 −4 22 50−4 24 −3 19 51 −3 25 −3 17 53 −3 26 −3 15 55 −3 27 −2 12 56 −2 28 −2 1058 −2 29 −1 7 59 −1 30 −1 5 61 −1 31 −1 4 61 0

As could be noticed, ideal slope of the line 2602 shown in FIG. 26 ,could be obtained from the parameters of the input step reference signalusing the following equation:

$a = {\frac{v_{1} - v_{0}}{32}.}$

Indeed, when integer sample offset changes from 0 to 1, the value ofpredicted sample in the transition position 2501 should change from ν₁to ν₀. Predicted sample values in the transition position 2501 forfractional (subsample) offset should fall in the range between ν₁ to ν₀depending on the value of subsample position. The model is based on thelinear interpolation function, i.e., it is assumed that the values ofpredicted sample in position 2501 could be obtained by linearinterpolation of two neighboring reference samples. One of theseneighboring reference samples has the value of ν₀ and the other one hasthe value of ν₁. Line 2602 could be also called as ideal line, orpre-defined line.

When ideal slope is calculated, the values on the line 2602 is obtaineddirectly from the value of p as follows:

r(p)=ν₀+(32−p)·a

Beneficial effect of the method is in improvement of average accuracy ofthe final result of interpolation for such input reference samples thatare of the same type as the reference signal used to update the outputfilter set in FIG. 23 .

Considering a fact that natural boundaries within a picture arepartitioned to the blocks of smaller size, and the fact, that filter setof a codec that is used for intra prediction depends on the block size,the edge model of the reference signal is more appropriate rather than aramp model or a harmonic model. The latter models could be used inoptimizing filter sets for the blocks of the larger sizes.

An alternative embodiment discloses a method comprising aggregation overseveral positions 2501. In FIG. 25C, several columns, with indices 7, 8and 9 could be used to apply an aggregate function. The difference withthe previously disclosed embodiment is the model of the line 2602 beingused to calculate the differences. For column x=8 (position 2501 in FIG.25A and FIG. 25B), the values on the line 2602 is obtained directly fromthe value of p as in the previous embodiment:

r(p)=ν₀+(32−p)·a.

For column x=7, the value on the line 2602 is obtained directly withoutconsideration for the value of p as follows:

r(p)=ν₀;

and for column x=9, the value on the line 2602 is obtained directlywithout consideration for the value of p as follows:

r(p)=ν₁.

It is understood, that in alternative embodiment based on the harmonicmodel of the reference signal, the line 2602 would be defined asfollows. The values on the line 2602 are obtained directly from thevalue of p and the values of s(x) for the set of positions 2602:

${{r(p)} = {{s( x_{0} )} \times {\cos( {2{\pi \cdot \frac{p}{32}}} )}}},$

In the equation above, the “x₀” denotes the position belonging to a setof positions that are used to obtain the value of the aggregatefunction.

An alternative estimation methods are based on frequency analysismethods. Such an estimation method would comprise the following steps:

-   -   obtaining transfer functions parameters for filter of the output        set and the candidate filters;    -   applying an aggregate function to the transfer functions        parameters providing a scalar value per each of the obtained        transfer functions.

It is understood, that the steps shown in FIG. 23 could be performed inseveral iterations. For example, in first iteration, the steps as shownin FIG. 23 would be performed for each of the subsample positions “p”2301, starting from 1 and completing by 16. The output set of filtersdetermined at the end of the first iteration would be used in the nextiterations that repeat the steps shown in FIG. 23 for each of thesubsample positions “p” 2301, starting from 1 and completing by 16.

It is also understood, that alternative embodiments may modify thenumber of checked subsample positions with the number of iterationsperformed. For example, the number of checked subsample positions may bereduced, i.e., for the i-th iteration, the subsample positions “p” 2301,starting from i and completing by 16 would be checked.

Coefficients for the value of the subsample positions “p” equal to 0could be just defined as a bypass filter (i.e., as [0 64 0 0]) since nointerpolation required for non-fractional position. Due to thesymmetrical properties of interpolation, a filter “F_(t)” for subsamplepositions p that is in the range of 17 to 31 could be obtained fromcorresponding filter for subsample position (32-p) “F_(s)” by taking itscoefficients in reverse order. Specifically, if F_(s) is defined as aset of coefficients {c₀, c₁ c₂, c₃} for the subsample position (32-p),the filter F_(t) for position subsample positions p would be defined as{c₃, c₂, c₁, c₀}.

In particular, the following methods and embodiments implemented by adecoding or encoding device are provided. The decoding device may bevideo decoder 30 of FIG. 1A, or decoder 30 of FIG. 3 . The encodingdevice may be video encoder 20 of FIG. 1A, or encoder 20 of FIG. 2 .

FIG. 27 shows a flowchart 2700 of the intra/inter-prediction processing.The exemplary method 2700 is used to obtain predicted samples for eachset of positions of predicted samples by performing the following steps:in step 2701, a filter (a set of coefficients) is obtained from a set offilters based on the subsample position (p) defined for the set ofpositions of predicted samples, for example, based on the tables 1-12described above. The set of filters is obtained by combining at leasttwo input filter sets. In step 2702, the method determines a subset ofreference samples for the set of positions of predicted samples. In step2703, the method obtains predicted samples at positions of the set ofpositions of predicted samples by convolving the subset of referencesamples with the obtained filter. The set of filters may be obtained bycombining at least two pre-defined filter sets using an estimationmethod, and where the estimation method uses a reference signal s(x) andan aggregate function. The reference signal s(x) may be pre-defined, asthe example described in FIG. 23 .

For example, the estimation method may include the following steps:

-   -   Initializing an output filter set by one of the input filter        sets;    -   obtaining a set of filtered signals s_(F)(p,x) for a set of        subsample position (p) by convolving the reference signal s(x)        with a filter (A1) of the output filter set that corresponds to        the subsample position (p) value; and    -   replacing the filter (A1) of the output filter set corresponding        to the subsample position (p) with an input filter (A2) when the        value of an aggregate function for the input filter (A2) is        smaller than the value of an aggregate function for the filter        (A1) of the output filter set.

The value of an aggregate function for the filter (A1) of the outputfilter set is obtained based on values of s_(F)(p,x) for the given valueof x. As an example, the value of an aggregate function (A1) may beobtained as the estimation of distance between a pre-defined line r(p)and values of s_(F)(p,x) for the given value of x.

The method 2700 may further includes: obtaining a filtered referencesignal s_(F1) (p,x) by convolving the reference signal s(x) with theinput filter (A2) belonging to the set of input filters.

The value of an aggregate function (A2) may be obtained as theestimation of distance between the pre-defined line r(p) and values ofs_(F1)(p,x) for the given value of x.

As different embodiments, the reference signal may be a set of integervalues, or a step function, or a harmonic function. For example, thereference signal is defined as

round(A*cos(Nπx/T)),

where A is a nonzero value, T is an integer value equal to the number ofsamples in the reference signal minus one, x is a set of integer values,x ∈ [0, T] an integer value,

$N \leq {\frac{T}{2}.}$

As another example, the reference signal is defined as

${s(x)} = \{ {\begin{matrix}{v_{0},{x < t}} \\{v_{1},{x \geq t}}\end{matrix},} $

where {ν₀, ν₁} are integer values, t is an integer nonzero value.

FIG. 28 shows a schematic of the intra/inter processing module 2800,which comprises an obtaining unit 2810, a determining unit 2820, and apredicting unit 2830. The intra/inter processing module 2800 is includedin a device. The device may be video decoder 30 of FIG. 1A, or decoder30 of FIG. 3 , or may be video encoder 20 of FIG. 1A, or encoder 20 ofFIG. 2 . The intra/inter processing module 2800 can be used to implementthe embodiment 2700, and the other embodiments described above.

The obtaining unit 2810 configured to obtain a filter (a set ofcoefficients) from a set of filters based on the subsample position (p)defined for the set of positions of predicted samples, where the set offilters is obtained by combining at least two input filter sets, andwhere the input filter sets are pre-defined.

The determining unit 2820 configured to determine a subset of referencesamples for the set of positions of predicted samples.

The predicting unit 2830 configured to obtain predicted samples atpositions of the set of positions of predicted samples by convolving thesubset of reference samples with the obtained filter.

According to an embodiment of the present disclosure, an encoder (20) isprovided, comprising processing circuitry for carrying out the methodaccording to any one of the previous embodiments of the presentdisclosure.

According to an embodiment of the present disclosure, a decoder (30) isprovided, comprising processing circuitry for carrying out the methodaccording to any one of the previous embodiments of the presentdisclosure.

According to an embodiment of the present disclosure, a computer programproduct is provided, comprising a program code for performing the methodaccording to any one of the previous embodiments of the presentdisclosure.

According to an embodiment of the present disclosure, a decoder isprovided, comprising: one or more processors; and a non-transitorycomputer-readable storage medium coupled to the processors and storingprogramming for execution by the processors, wherein the programming,when executed by the processors, configures the decoder to carry out themethod according to any one of the previous embodiments of the presentdisclosure.

According to an embodiment of the present disclosure, an encoder isprovided, comprising: one or more processors; and a non-transitorycomputer-readable storage medium coupled to the processors and storingprogramming for execution by the processors, wherein the programming,when executed by the processors, configures the encoder to carry out themethod according to any one of the previous embodiments of the presentdisclosure.

The present disclosure according to any of the previous embodiments mayprovide an advantage of performing the intra/inter-prediction of a videoframe in fast manner. This is because the filter coefficients of theinterpolation filter are obtained in an analytical manner, i.e., saidcoefficients are calculated on-the-fly. This avoids storing thecoefficients in a look-up table (LUT), requiring access time to read thecoefficients from the memory.

Thus, the prediction becomes more efficient, and requires less demand onmemory required. This allows also a low-cost implementation of theprediction. Moreover, since the analytical filter coefficients {c₁} arelinear in the fractional sample position p, and involve dividingoperations by 2, the respective operation may be performed efficientlyby employing fast low-level bit operations. The respective time forperforming the bit operation and for calculating the filter coefficientsis shorter than the time for accessing the stored coefficients from theLUT. Thus, the latency is reduced.

Moreover, the particular analytic structure of the filter coefficientsmay provide an advantage of a low-complexity implementation of thefilter unit(s). Over above, the filter response (i.e., frequencyresponse) for different subsample positions is consistent with respectto magnitude and phase and avoids artefacts in the response inparticular at high frequencies. The linearity of the filter coefficientsmay provide an advantage of reusing hardware.

Further, the present disclosure relates to intra- or inter-predictionfor video encoding and decoding. For that purpose, an apparatus andmethods obtain a reference sample and a subpixel offset value. Asubpixel 4-tap interpolation filter is used to filter the referencesample to obtain a predicted sample value. The filter coefficients ofthe subpixel 4-tap interpolation filter are defined according to thevalue of the subpixel offset, such as

${c_{0} = {16 - \frac{p}{2}}},{c_{1} = {16 + 16 - \frac{p}{2}}},{c_{2} = {16 + \frac{p}{2}}},{{{and}c_{3}} = \frac{p}{2}},$

with p being a fractional part of the value of subpixel offset.

Moreover, the following embodiments are provided herein.

Embodiment 1: A method of intra or inter prediction of a block, themethod comprising:

-   -   determining the set of reference samples;    -   obtaining predicted samples by performing the following steps        for each set of positions of predicted samples:    -   obtaining a filter (a set of coefficients) from a set of filters        based on the subpixel position (p) defined for the set of        positions of predicted samples;    -   determining a subset of reference samples for the set of        positions of predicted samples; and    -   obtaining predicted samples at positions of the set of positions        of predicted samples by convolving the subset of reference        samples with the obtained filter, wherein the set of filters is        obtained by combining at least two input filter sets, and        wherein the input filter sets are pre-defined.

Embodiment 2: The method of embodiment 1, wherein the set of positionsof predicted samples is a row of predicted block.

Embodiment 3: The method of embodiment 1, wherein the set of positionsof predicted samples is a column of predicted block.

Embodiment 4: The method of any of embodiments 1-3, wherein the set offilters is obtained by combining at least two pre-defined filter setsusing an estimation method, and wherein the estimation method uses areference signal s(x) and an aggregate function, wherein the referencesignal s(x) is pre-defined.

Embodiment 5: The method of embodiment 4, wherein the estimation methodcomprises the following steps:

-   -   Initializing an output filter set by one of the input filter        sets;    -   obtaining a set of filtered signals s_(F)(p,x) for a set of        subpixel position (p) by convolving the reference signal s(x)        with a filter (A1) of the output filter set that corresponds to        the subpixel position (p) value;    -   replacing the filter (A1) of the output filter set corresponding        to the subpixel position (p) with an input filter (A2) when the        value of an aggregate function for the input filter (A2) is        smaller than the value of an aggregate function for the filter        (A1) of the output filter set, wherein the value of an aggregate        function for the filter (A1) of the output filter set is        obtained based on values of s_(F)(p,x) for the given value of x.

Embodiment 6: The method of embodiment 5, wherein the method comprises:obtaining the value of an aggregate function (A1) as the estimation ofdistance between a pre-defined line r(p) and values of s_(F)(p,x) forthe given value of x.

Embodiment 7: The method of embodiment 5 or 6, wherein the methodfurther comprises: obtaining a filtered reference signal s_(F1) (p,x) byconvolving the reference signal s(x) with the input filter (A2)belonging to the set of input filters; and wherein the method comprises:obtaining the value of an aggregate function (A2) as the estimation ofdistance between the pre-defined line r(p) and values of s_(F1) (p,x)for the given value of x.

Embodiment 8: The method of any of embodiments 5-7, wherein theaggregate function is calculated based on the result of the convolutionof the reference signal with a filter.

Embodiment 9: The method of any of embodiments 4-8, wherein thereference signal is a set of integer values.

Embodiment 10: The method of any of embodiments 4-8, wherein thereference signal is a step function.

Embodiment 11: The method of any of embodiments 4-8, wherein thereference signal is a harmonic function.

Embodiment 12: The method of any of embodiments 4-8, wherein thereference signal is defined as

round(A*cos(Nπx/T)),

wherein A is a nonzero value, T is an integer value equal to the numberof samples in the reference signal minus one, x is a set of integervalues, x ∈ [0, T], N is an integer value,

$N \leq {\frac{T}{2}.}$

Embodiment 13: The method of any of embodiments 4-8, wherein thereference signal is defined as

${s(x)} = \{ {\begin{matrix}{v_{0},{x < t}} \\{v_{1},{x \geq t}}\end{matrix},} $

wherein {ν₀, ν₁} are integer values, t is an integer nonzero value.

Embodiment 14: A method of embodiment 8, wherein the filter is an FIRfilter that is defined by four coefficients, each of the coefficientsbelongs to a range of [−64,64] and a sum of these four coefficients isequal to 64.

Embodiment 15: The method of any of embodiments 1-14, wherein thesubpixel position (p) is defined for a row or a column of the predictedsamples.

Embodiment 16: The method of any of embodiments 5-8, wherein the valueof the aggregate function for the current filter of the output filterset is a sum of absolute values of differences calculated for a set ofsubpixel positions {p}, each difference is obtained for a subpixelposition p by subtracting the value of a pre-defined line at thesubpixel position p and a filtered reference signal at a given spatialposition x, wherein the filtered reference signal is obtained byconvolving reference signal with a filter corresponding to the subpixelposition p.

Embodiment 17: The method of any of embodiments 5-8, wherein the valueof the aggregate function for the current filter of the output filterset is a sum of squared differences calculated for a set of subpixelpositions {p}, each difference is obtained for a subpixel position p bysubtracting the value of pre-defined line at the subpixel position p anda filtered reference signal at a given spatial position x, wherein thefiltered reference signal is obtained by convolving reference signalwith a filter corresponding to the subpixel position p

Embodiment 18: The method of embodiment 16 or 17, wherein the value r(p)on the pre-defined line is obtained from the value of p as follows:

r(p)=ν₀+(32−p)·a

wherein ν₀ is the value of one of neighboring reference samples, a is aninteger sample offset.

Embodiment 19: The method of embodiment 16 or 17, wherein the value r(p)on the pre-defined line is obtained from the value of p as follows:

${r(p)} = {{s( x_{0} )} \times {\cos( {2{\pi \cdot \frac{p}{32}}} )}}$

wherein ν₀ is the value of one of neighboring reference samples.

Embodiment 20: The method of any of embodiments 5-8, 16-19, wherein theaggregate function is a sum of squares or a sum of absolute values.

Although the embodiments of the disclosure have been primarily describedbased on video coding, it should be noted that the embodiments of thecoding system 10, encoder 20 and decoder 30 (and correspondingly thesystem 10) and the other embodiments described herein may also beconfigured for still picture processing or coding, i.e., the processingor coding of an individual picture independent of any preceding orconsecutive picture as in video coding. In general only inter-predictionunits 244 (encoder) and 344 (decoder) may not be available in case thepicture processing coding is limited to a single picture 17. All otherfunctionalities (also referred to as tools or technologies) of the videoencoder 20 and video decoder 30 may equally be used for still pictureprocessing, e.g., residual calculation 204/304, transform 206,quantization 208, inverse quantization 210/310, (inverse) transform212/312, partitioning 262/362, intra-prediction 254/354, and/or loopfiltering 220, 320, and entropy coding 270 and entropy decoding 304.

Embodiments, e.g., of the encoder 20 and the decoder 30, and functionsdescribed herein, e.g., with reference to the encoder 20 and the decoder30, may be implemented in hardware, software, firmware, or anycombination thereof. If implemented in software, the functions may bestored on a computer-readable medium or transmitted over communicationmedia as one or more instructions or code and executed by ahardware-based processing unit. Computer-readable media may includecomputer-readable storage media, which corresponds to a tangible mediumsuch as data storage media, or communication media including any mediumthat facilitates transfer of a computer program from one place toanother, e.g., according to a communication protocol. In this manner,computer-readable media generally may correspond to (1) tangiblecomputer-readable storage media which is non-transitory or (2) acommunication medium such as a signal or carrier wave. Data storagemedia may be any available media that can be accessed by one or morecomputers or one or more processors to retrieve instructions, codeand/or data structures for implementation of the techniques described inthis disclosure. A computer program product may include acomputer-readable medium.

By way of example, and not limiting, such computer-readable storagemedia can comprise RAM, ROM, EEPROM, CD-ROM or other optical diskstorage, magnetic disk storage, or other magnetic storage devices, flashmemory, or any other medium that can be used to store desired programcode in the form of instructions or data structures and that can beaccessed by a computer. Also, any connection is properly termed acomputer-readable medium. For example, if instructions are transmittedfrom a website, server, or other remote source using a coaxial cable,fiber optic cable, twisted pair, digital subscriber line (DSL), orwireless technologies such as infrared, radio, and microwave, then thecoaxial cable, fiber optic cable, twisted pair, DSL, or wirelesstechnologies such as infrared, radio, and microwave are included in thedefinition of medium. It should be understood, however, thatcomputer-readable storage media and data storage media do not includeconnections, carrier waves, signals, or other transitory media, but areinstead directed to non-transitory, tangible storage media. Disk anddisc, as used herein, includes compact disc (CD), laser disc, opticaldisc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wheredisks usually reproduce data magnetically, while discs reproduce dataoptically with lasers. Combinations of the above should also be includedwithin the scope of computer-readable media.

Instructions may be executed by one or more processors, such as one ormore digital signal processors (DSPs), general purpose microprocessors,application specific integrated circuits (ASICs), field programmablelogic arrays (FPGAs), or other equivalent integrated or discrete logiccircuitry. Accordingly, the term “processor,” as used herein may referto any of the foregoing structure or any other structure suitable forimplementation of the techniques described herein. In addition, in someaspects, the functionality described herein may be provided withindedicated hardware and/or software modules configured for encoding anddecoding, or incorporated in a combined codec. Also, the techniquescould be fully implemented in one or more circuits or logic elements.

The techniques of this disclosure may be implemented in a wide varietyof devices or apparatuses, including a wireless handset, an integratedcircuit (IC) or a set of ICs (e.g., a chip set). Various components,modules, or units are described in this disclosure to emphasizefunctional aspects of devices configured to perform the disclosedtechniques, but do not necessarily require realization by differenthardware units. Rather, as described above, various units may becombined in a codec hardware unit or provided by a collection ofinter-operative hardware units, including one or more processors asdescribed above, in conjunction with suitable software and/or firmware.

1. A method of intra or inter prediction of a block, the methodcomprising: obtaining predicted samples by performing the followingsteps for each set of positions of the predicted samples: obtaining afilter from a set of filters based on a subsample position (p) definedfor the set of positions of the predicted samples; determining a subsetof reference samples for the set of positions of the predicted samples;and obtaining the predicted samples at positions of the set of positionsof the predicted samples by convolving the subset of reference sampleswith the obtained filter, wherein the set of filters is obtained bycombining at least two input filter sets, and wherein the at least twoinput filter sets are pre-defined.
 2. The method of claim 1, wherein theset of positions of the predicted samples is a row or a column of theblock, and the subsample position (p) is defined for a row or a columnof the predicted samples.
 3. The method of claim 1, wherein the set offilters is obtained by combining at least two pre-defined filter setsusing an estimation method, and wherein the estimation method uses areference signal s(x) and an aggregate function, wherein the referencesignal s(x) is pre-defined.
 4. The method of claim 3, wherein theestimation method comprises the following steps: initializing an outputfilter set by one of the input filter sets; obtaining a set of filteredsignals s_(F)(p,x) for a set of subsample position (p) by convolving thereference signal s(x) with a filter (A1) of the output filter set thatcorresponds to a subsample position (p) value; replacing the filter (A1)of the output filter set corresponding to the subsample position (p)value with an input filter (A2) when a value of an aggregate functionfor the input filter (A2) is smaller than a value of an aggregatefunction for the filter (A1) of the output filter set, wherein the valueof the aggregate function for the filter (A1) of the output filter setis obtained based on values of s_(F)(p,x) for a given value of x.
 5. Themethod of claim 4, wherein the method comprises: obtaining the value ofthe aggregate function for the (A1) as an estimation of a distancebetween a pre-defined line r(p) and the values of s_(F)(p,x) for thegiven value of x.
 6. The method of claim 4, wherein the method furthercomprises: obtaining a filtered reference signal s_(F1) (p,x) byconvolving the reference signal s(x) with the input filter (A2)belonging to the set of input filters; and wherein the method comprises:obtaining the value of the aggregate function for the input filer (A2)as an estimation of a distance between a pre-defined line r(p) andvalues of s_(F1)(p,x) for the given value of x.
 7. The method of claim4, wherein the aggregate function is calculated based on a result of theconvolution of the reference signal s(x) with a filter.
 8. The method ofclaim 3, wherein the reference signal s(x) is a set of integer values, astep function, or a harmonic function.
 9. The method of claim 3, whereinthe reference signal s(x) is defined asround(A*cos(Nπx/T)), wherein A is a nonzero value, T is an integer valueequal to the number of samples in the reference signal s(x) minus one, xis a set of integer values, x ∈ [0, T], N is an integer value,$N \leq {\frac{T}{2}.}$
 10. The method of claim 3, wherein the referencesignal s(x) is defined as ${s(x)} = \{ {\begin{matrix}{v_{0},{x < t}} \\{v_{1},{x \geq t}}\end{matrix},} $ wherein {ν₀, ν₁} are integer values, t is aninteger nonzero value.
 11. A method of claim 7, wherein the filter is afinite impulse response (FIR) filter that is defined by fourcoefficients, each of the coefficients belongs to a range of [−64,64]and a sum of these four coefficients is equal to
 64. 12. The method ofclaim 1, wherein a set of filter coefficients includes at least oneentry of the following table: Subsample Filter 1 offset p c₀ c₁ c₂ c₃ 00 64 0 0 1 −1 63 2 0 2 −1 61 5 −1 3 −1 59 7 −1 4 −2 58 10 −2 5 −2 56 12−2 6 −3 55 15 −3 7 −3 53 17 −3 8 −3 51 19 −3 9 −4 50 22 −4 10 −4 48 24−4 11 −4 46 26 −4 12 −5 45 29 −5 13 −4 42 30 −4 14 −4 40 32 −4 15 −4 3834 −4 16 −5 37 37 −5 17 −4 34 38 −4 18 −4 32 40 −4 19 −4 30 42 −4 20 −529 45 −5 21 −4 26 46 −4 22 −4 24 48 −4 23 −4 22 50 −4 24 −3 19 51 −3 25−3 17 53 −3 26 −3 15 55 −3 27 −2 12 56 −2 28 −2 10 58 −2 29 −1 7 59 −130 −1 5 61 −1 31 −1 4 61 0


13. The method of claim 1, wherein a set of filter coefficients includesat least one entry of the following table: Subsample Filter 1 offset pc₀ c₁ c₂ c₃ 0 0 64 0 0 1 −1 63 3 −1 2 −1 61 5 −1 3 −1 59 7 −1 4 −2 58 10−2 5 −2 56 12 −2 6 −3 55 15 −3 7 −3 53 17 −3 8 −3 51 19 −3 9 −4 50 22 −410 −4 48 24 −4 11 −4 46 26 −4 12 −5 45 29 −5 13 −4 42 30 −4 14 −4 40 32−4 15 −4 38 34 −4 16 −5 37 37 −5 17 −4 34 38 −4 18 −4 32 40 −4 19 −4 3042 −4 20 −5 29 45 −5 21 −4 26 46 −4 22 −4 24 48 −4 23 −4 22 50 −4 24 −319 51 −3 25 −3 17 53 −3 26 −3 15 55 −3 27 −2 12 56 −2 28 −2 10 58 −2 29−1 7 59 −1 30 −1 5 61 −1 31 −1 4 61 0


14. The method of claim 1, wherein a set of filter coefficients includesat least one entry of the following table: Subsample Filter 1 offset pc₀ c₁ c₂ c₃ 0 0 64 0 0 1 −1 62 4 −1 2 −1 61 5 −1 3 −1 59 7 −1 4 −2 58 10−2 5 −2 56 12 −2 6 −3 55 15 −3 7 −3 53 17 −3 8 −3 51 19 −3 9 −4 50 22 −410 −4 48 24 −4 11 −4 46 26 −4 12 −5 45 29 −5 13 −4 42 30 −4 14 −4 40 32−4 15 −4 38 34 −4 16 −5 37 37 −5 17 −4 34 38 −4 18 −4 32 40 −4 19 −4 3042 −4 20 −5 29 45 −5 21 −4 26 46 −4 22 −4 24 48 −4 23 −4 22 50 −4 24 −319 51 −3 25 −3 17 53 −3 26 −3 15 55 −3 27 −2 12 56 −2 28 −2 10 58 −2 29−1 7 59 −1 30 −1 5 61 −1 31 −1 4 61 0


15. The method of claim 4, wherein the value of the aggregate functionfor the current filter of the output filter set is a sum of absolutevalues of differences or a sum of squared differences calculated for aset of subsample positions {p}, each difference is obtained for asubsample position p by subtracting a value of a pre-defined line at thesubsample position p and a filtered reference signal at a given spatialposition x, wherein the filtered reference signal is obtained byconvolving the reference signal s(x) with a filter corresponding to thesubsample position p.
 16. The method of claim 15, wherein a value r(p)on the pre-defined line is obtained from a value of p as follows:r(p)=ν₀+(32−p)·a wherein ν₀ is a value of one of neighboring referencesamples, a is an integer sample offset.
 17. The method of claim 15,wherein a value r(p) on the pre-defined line is obtained from a value ofp as follows:${r(p)} = {{s( x_{0} )} \times {\cos( {2{\pi \cdot \frac{p}{32}}} )}}$wherein ν₀ is a value of one of neighboring reference samples.
 18. Themethod of claim 4, wherein the aggregate function is a sum of squares ora sum of absolute values.
 19. A device, comprising: one or moreprocessors; and a non-transitory computer-readable storage mediumcoupled to the one or more processors and storing programming forexecution by the one or more processors, wherein the programming, whenexecuted by the one or more processors, causes the device to carry out:obtaining predicted samples by performing the following steps for eachset of positions of the predicted samples: obtaining a filter from a setof filters based on a subsample position (p) defined for the set ofpositions of the predicted samples; determining a subset of referencesamples for the set of positions of the predicted samples; and obtainingthe predicted samples at positions of the set of positions of thepredicted samples by convolving the subset of reference samples with theobtained filter, wherein the set of filters is obtained by combining atleast two input filter sets, wherein the at least two input filter setsare pre-defined, and wherein the device is a decoder or an encoder. 20.A non-transitory storage medium having a bitstream andcomputer-executable instructions stored thereon which, when executed byone or more processors, cause the one or more processors to encodeand/or decode the bitstream by carrying out: obtaining predicted samplesby performing the following steps for each set of positions of thepredicted samples: obtaining a filter from a set of filters based on asubsample position (p) defined for the set of positions of the predictedsamples; determining a subset of reference samples for the set ofpositions of the predicted samples; and obtaining the predicted samplesat positions of the set of positions of the predicted samples byconvolving the subset of reference samples with the obtained filter,wherein the set of filters is obtained by combining at least two inputfilter sets, and wherein the at least two input filter sets arepre-defined.